View Single Post
05/29/23, 02:19 PM   #6
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 247
Originally Posted by Baertram View Post
If you want to remove the delimiter it should be enough to use tonumber function.
But if you want to save and show it differently you cannot use both, with delimiter and without in your same 1 SavedVars variable!

Your SavedVars should save with tonumber and your getFunc needs to convert the visual parts to show with the delimiter then (get SV, convert to with delimiter, return in getFunc). And in setFunc do the opposite.
ok the saved variables are working with the tonumber.. where I'm having the issue now is with the "choices" in the dropdown. It doesn't like entries like 1,000, 10,000.

ive tried:

Code:
choices = {"0", "100", "1,000", "10,000"},
choices = {0, 100, 1,000, 10,000},
choices = {0, 100, (1,000), (10,000)},

and

choices = {0, 100, ZO_LocalizeDecimalNumber(1000), ZO_LocalizeDecimalNumber(10000)}, << which displays perfectly but i think its saving the function with the value in the variable.
any suggestions to display comma delimited in the choices? I've tried everythign I can think of.

**EDIT Hmm maybe i'll just save the variables with commas and use the tonumber once in the banking code to convert it back there.. unless u can think of another way to format the "choices" line

Last edited by sinnereso : 05/29/23 at 02:24 PM.
  Reply With Quote