10-15-2020 13:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-15-2020 13:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

Accepted Solutions
10-15-2020 14:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-15-2020 14:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You could try something like:
settingsStorage.setItem(key, JSON.stringify({'name':'12.34'}))
Gondwana Software

10-15-2020 14:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-15-2020 14:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You could try something like:
settingsStorage.setItem(key, JSON.stringify({'name':'12.34'}))
Gondwana Software

10-19-2020 13:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-19-2020 13:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
That appears to work, thank you.
