Warning: I2localization can interfere with parsing
8 years 1 month ago - 8 years 1 month ago #1892
by kylerwk
Warning: I2localization can interfere with parsing was created by kylerwk
Just wanted to bring up the fact that a change that was made to I2 Localization has been causing us some issues that we wouldn't have ever anticipated.
Our game saves and loads various types of files and uses functions like
This was all working well for us, except we found out that I2 localization was changingwhen the player changed the games language.
This caused the Parsing function to change how it handles commas and periods in decimal numbers, causing all sorts of different types of bugs.
Our solution is is to useso that the CurrentCulture doesn't effect anything else.
Just wanted to give everyone and the devs of I2 a heads up that this plugins updates can have far reaching on code it isn't really connected to.
Our game saves and loads various types of files and uses functions like
Parsing.ParseFloat(attr.Value);
This was all working well for us, except we found out that I2 localization was changing
System.Threading.Thread.CurrentThread.CurrentCulture
This caused the Parsing function to change how it handles commas and periods in decimal numbers, causing all sorts of different types of bugs.
Our solution is is to use
Parsing.ParseFloat_InvariantCulture (attr.Value);
Just wanted to give everyone and the devs of I2 a heads up that this plugins updates can have far reaching on code it isn't really connected to.
Last edit: 8 years 1 month ago by kylerwk.
Please Log in or Create an account to join the conversation.
8 years 1 month ago #1893
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Warning: I2localization can interfere with parsing
Hi,
Sorry for this issue, You can download 2.6.9a2 which has a fix for that, or do the changes listed in this post:
inter-illusion.com/forum/i2-localization...tion-of-scripts#1887
Thanks,
Frank
Sorry for this issue, You can download 2.6.9a2 which has a fix for that, or do the changes listed in this post:
inter-illusion.com/forum/i2-localization...tion-of-scripts#1887
Thanks,
Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
To get the betas as soon as they are ready,
check this out
Please Log in or Create an account to join the conversation.
Time to create page: 0.190 seconds