MattEqualsCoder / MSUScripter

Application for creating MSUs and related files
MIT License
5 stars 2 forks source link

Fix PyMusicLooper "invalid value" "not a valid float" on non-US cultures #54

Closed Vivelin closed 9 months ago

Vivelin commented 9 months ago

I updated PyMusicLooperService to explicitly use InvariantCulture when formatting and parsing ints and doubles. Ints probably weren't necessary, but I added those too just in case.

Doubles, however, would fail completely on my machine since I have my regional formatting settings set to English (Netherlands), which would use e.g. 0,25 instead of 0.25, which PyMusicLooper would complain about.

Likewise, double.Parse (for the confidence) would return e.g. 98xxx values instead of 0.98xxx.

Fixes #53

MattEqualsCoder commented 9 months ago

Huh. TIL that parsing numbers even has that parameter. Guess that's my US privilege peeking through. Hah. This is good to know!