Hi, I have a problem with large number. If the value in global variables is higher than number 100200300400500600700800900, I can't save it and so it doesn't appear properly (i.e.: 1.002003004005006e+21). Does anybody know why?
Another thing about values - is there a way to apply the currency format to the numbers globally? (for really large number, i.e.: 100,200,300,400,500,600,700,800,900,000)
Develop games in your browser. Powerful, performant & highly capable.
What are you trying to do? Computers can't store infinitely large numbers - there's always a limit. Looks like you are encoding something, so a string would be better.
I?m currently developing this game goo.gl/hwNebC , when the player reaches certain high score, the problem appears goo.gl/cQQhCS . Preview goo.gl/vWDrMw .
I'm not sure someone will bake a gazillion pizza's, but if you really want to be able to do this maybe you should split up the number.
so if 1 million pizza's is reached, add 1 to the variable millions.
and if the variable millions exists add the variable to the string showing the score.
Here is some psuedo code for a function to convert any number to currency format text.
if num >= 1000 then
return format(int(num/1000)) & "," & zeropad(num%1000, 3)