I removed the default Gamepseeds form the Configuration database and added 3 of my own. They make the InGameTopOptionsMenu.lua file produce an error:-
The offending Code:
If I comment out the lines the error is fixed, now to me this is not really the way to fix a bug
, although it is at the moment serving as a temp fix. I am unsure as to why this would generate an error, my Lua is very sketchy at best. Any help much appreciated!
Code:
Runtime Error: E:\SteamLibrary\steamapps\common\Sid Meier's Civilization VI\Base\Assets\UI\Menus\InGameTopOptionsMenu.lua:281: attempt to index a nil value
stack traceback:
E:\SteamLibrary\steamapps\common\Sid Meier's Civilization VI\Base\Assets\UI\Menus\InGameTopOptionsMenu.lua:281: in function 'RefreshIconData'
E:\SteamLibrary\steamapps\common\Sid Meier's Civilization VI\Base\Assets\UI\Menus\InGameTopOptionsMenu.lua:226: in function 'SetupButtons'
E:\SteamLibrary\steamapps\common\Sid Meier's Civilization VI\Base\Assets\UI\Menus\InGameTopOptionsMenu.lua:383: in function 'OnShow'
Lua callstack:
The offending Code:
Code:
local gameSpeedType = GameInfo.GameSpeeds[GameConfiguration.GetGameSpeedType()].GameSpeedType; -- This is the line the stack traceback links too
Controls.GameSpeed:SetIcon(ICON_PREFIX..gameSpeedType);
local speedTooltip = Locale.Lookup("LOC_AD_SETUP_GAME_SPEED")..":[NEWLINE]"..Locale.Lookup(GameInfo.GameSpeeds[GameConfiguration.GetGameSpeedType()].Name);
Controls.GameSpeed:SetToolTipString(speedTooltip);
If I comment out the lines the error is fixed, now to me this is not really the way to fix a bug
