[PATCH] Color Picker fails with MatchSettings of alpha 18
Today I tested the latest r17040, when I choose a single player game, when you choose your faction, the error appears:
WARNING: JavaScript warning: gui/gamesetup/gamesetup.js line 901 reference to undefined property pData.Color
ERROR: JavaScript error: gui/common/functions_utility.js line 151 TypeError: color2 is undefined sameColor@gui/common/functions_utility.js:151:5 selectPlayerColor/pData<@gui/gamesetup/gamesetup.js:901:39 selectPlayerColor@gui/gamesetup/gamesetup.js:901:6 initMain/colorPicker.onSelectionChange@gui/gamesetup/gamesetup.js:377:48 onGameAttributesChange@gui/gamesetup/gamesetup.js:1532:4 loadGameAttributes@gui/gamesetup/gamesetup.js:784:2 initMain@gui/gamesetup/gamesetup.js:403:3 onTick@gui/gamesetup/gamesetup.js:829:3 __eventhandler36 (tick)@setupWindow tick:0:1
WARNING: JavaScript warning: gui/gamesetup/gamesetup.js line 383 reference to undefined property g_GameAttributes.settings.PlayerData[playerSlot]
ERROR: JavaScript error: gui/gamesetup/gamesetup.js line 383 TypeError: g_GameAttributes.settings.PlayerData[playerSlot] is undefined initMain/civ.onSelectionChange@gui/gamesetup/gamesetup.js:383:5 initCivNameList@gui/gamesetup/gamesetup.js:588:3 initMain@gui/gamesetup/gamesetup.js:121:2 onTick@gui/gamesetup/gamesetup.js:829:3 __eventhandler36 (tick)@setupWindow tick:0:1
ERROR: JavaScript error: gui/gamesetup/gamesetup.js line 383 TypeError: g_GameAttributes.settings.PlayerData[playerSlot] is undefined initMain/civ.onSelectionChange@gui/gamesetup/gamesetup.js:383:5 initCivNameList@gui/gamesetup/gamesetup.js:588:3 initMain@gui/gamesetup/gamesetup.js:121:2 onTick@gui/gamesetup/gamesetup.js:829:3 __eventhandler36 (tick)@setupWindow tick:0:1
http://wildfiregames.com/forum/index.php?s=63819c21195ce79c90c23b607d4d0b20&showtopic=20059
Thanks for reporting. Yes, we noticed that too yesterday and I had uploaded a patch already, will be committed as soon as possible ;)
The reason for this bug is that the persist-matchsettings files of alpha 18 were not sanitized. For example they contain "Colour" instead of "Color" and sometimes both or neither.
The bug doesn't occur if svn creates the matchsettings file, as it was sanitized when changing the map.