UI - Great Works Manager

Wow... just checked the LUA.log file - and it was completely invaded by hundreds of statements like this;

[52338.366] GreatWorkManager: C:\Users\Zyxpsilon\Documents\My Games\Sid Meier's Civilization 5\MODS\UI - Great Work Manager (v 11)\UI/GreatWorkManager.lua:341: Cannot find key - GreatWorkYieldType

Needs to be fixed somehow, right?
That's the statement on line #341;

local slotColour = yieldColours[pBuilding.GreatWorkYieldType or 'YIELD_CULTURE'] or yieldColours['NO_YIELD']
If that could help determining what to do! :)
 
There's nothing wrong with that line of Lua code.

The problem is in the Firaxis implementation of the database to Lua API.

pBuilding is a C++ function masquerading as a table. The Lua spec states that accessing a non-existent key (GreatWorkYieldType in this case) for a table is valid and returns nil. In addition to returning nil, Firaxis decided to also log a message, so the problem is in the Firaxis Lua API C++ code (which we do not have the source code for) and not the actual mod. Until/If I can find yet another work around to poor Firaxis code the lua.log file will be filled with unnecessary warnings.
 
Back
Top Bottom