Quantcast
Channel: Civilization Fanatics' Forums
Viewing all articles
Browse latest Browse all 12856

Lua functions inaccessible

$
0
0
What can make all lua tables inaccessible? I added some code to line 71 of InfoTooltipInclude.lua:

Code:

function GetHelpTextForBuilding(buildingID, bExcludeName, bExcludeHeader, bNoMaintenance, city, bExcludeWritten)   
    if Game.GetActivePlayer() == 0 then print("Test") end

After meeting a major civ, this appears in the lua log if I open a city ProductionPanel:
Runtime Error: [string "D:\Thalassicus\Documents\My Games\Sid Meier..."]:71: attempt to call global 'Game' (a nil value)
It's like lua is gone. Any table I attempt to access is nil (functions, data, etc). The only time I encountered this problem before was while games load or close. The problem appeared in G&K, and did not exist in vanilla. The error does not occur if I open the TechTree, only other interface elements which use GetHelpTextForBuilding.

Viewing all articles
Browse latest Browse all 12856