The retrievedValue code is only used to calculate the starting value from the stored value, use the storedValue code to convert it first.
When making Simulators that contain objects that at each progress improve the quantity of points the player can get, you go to a point where you have to go over “normal” numbers and go up even to numbers like Sixtillions, Septillions, Octillions etc.
That still isn’t the case
If I convert 10, then revert it back from the stored value, I get 9.999__ which isn’t accurate
Also unsure how
local value = 9.99e50
could be stored in an orderedatastore as I believe ordereddatastores can only store integers and max out at 9.2 qi
It works, however I changed it slightly and used math.ceil
and math.floor
when getting the retrievedValue
from the stored value. So if you have a smaller number such as 6, it won’t come out as a long decimal, which is what @NinjoOnline was talking about.
Apologies for the bump. One question, if you already have a saved datastore and you changed the data to be stored in this way for higher values, could it affect previously saved data? Alternatively, would you have to start a new datastore that saves it in this way?
This is a precision loss as I mentioned would happen in my original post, you can round it. The larger the value the less precise it’d be. But when players go into the quintillions a few points difference isn’t an issue.