Page 1 of 1

js: Bug in case sensitivity in globals

Posted: 05 Feb 2012, 00:30
by Per
Javascript is supposed to be case sensitive. However, since the key value in the ini file format is case insensitive, and we use the variable name as key when saving, any variable used in global must be case insensitive for now. Otherwise variables will get wrong values when loaded from a savegame. There is no need to be case insensitive in regards to variables defined by the c++ code, only internally to your own script.

I will fix this problem later. For now, just be aware of the problem.

Re: js: Bug in case sensitivity in globals

Posted: 05 Feb 2012, 01:31
by aubergine
There's also an issue with save games containing non-configurable global and object properties. For example, all the game constants, and things like "me" are getting in to save game files.

Re: js: Bug in case sensitivity in globals

Posted: 07 Feb 2012, 23:51
by Per
I have removed all the predefined globals, except 'me', from the savegames now. Should look more tidy.