Closed ghost closed 2 years ago
That's weird because I'm already using the CultureInfo.InvariantCulture, maybe I forgot to use it in other methods. I will check as soon as I can and resolve this.
Confused, i'm german using 1.000,00 format without problems. Isn't that the bug where i must delete my config?
I tried to add more stability while parsing values to not generate this error again. Wait until I upload the next patch, then let me know if you encounter this error again.
The mod causes massive issues such as enemies dropping infinite loot until the world crashes on systems that don't use the US numbers formatting. The most likely cause is that the mod is converting strings to numbers assuming the English-US style of numbers such as "1,000.00", which breaks completely when trying to parse it on a system that uses different separators for thousands and decimals such as "1.000,00". The console is constantly spammed with errors such as these:
To reproduce this bug, either change your country to any in Europe that uses different thousands and decimal separators, or go to Regional Settings in the old Control Panel and change the thousands and decimal separators manually.
The solution is to always use
CultureInfo.InvariantCulture
when parsing strings into numbers, as that will force the parser to use US formatting even in systems that don't use it.