10-15-2020 13:57
10-15-2020 13:57
On my companions setting screen the user can enter float values and this is working fine. The values get saved and I can reference them with no issues. The problem is if I try to update the value by something like: settingsStorage.setItem(key, 12.34); the value will not be displayed on the settings screen. I tried converting the value to a string like: settingsStorage.setItem(key, String(12.34)) and settingsStorage.setItem(key, (12.34).toString()) and neither option worked. I must be doing something wrong. any ideas?
Answered! Go to the Best Answer.
10-15-2020 14:08
10-15-2020 14:08
You could try something like:
settingsStorage.setItem(key, JSON.stringify({'name':'12.34'}))
10-15-2020 14:08
10-15-2020 14:08
You could try something like:
settingsStorage.setItem(key, JSON.stringify({'name':'12.34'}))
10-19-2020 13:40
10-19-2020 13:40
That appears to work, thank you.