Loading floats stored in scientific notation = Crash
Posted: Fri May 27, 2016 9:23 am
Hi! Put my game out to beta earlier this week and today have come across a significant bug in my game. On examining their Dialogue System data, I have a float variable called "Travelled" which stores the number of meters the player has traveled. The player had walked so far around the world that their meters was now being stored in scientific notation: Variable["Travelled"]=1.307709E+07;
When I made the call to do:
PersistentDataManager.ApplySaveData (decompressedQuests);
It threw the error: threw exception 'Input string was not in the correct format'
I hacked that value back to zero, and on next load, it all ran fine.
That was the only float value in the database I'm using with the dialogue system, have now converted it to an integer as I can predict the format of that.
Just thought it worth mentioning in case anyone else ever comes across it!
When I made the call to do:
PersistentDataManager.ApplySaveData (decompressedQuests);
It threw the error: threw exception 'Input string was not in the correct format'
I hacked that value back to zero, and on next load, it all ran fine.
That was the only float value in the database I'm using with the dialogue system, have now converted it to an integer as I can predict the format of that.
Just thought it worth mentioning in case anyone else ever comes across it!