Auto-Saving generates error messages in lua.log

ExpiredReign

Deity
Joined
Jan 3, 2013
Messages
2,450
Location
Tasmania
Whilst taking some logs to have a look at another problem I noticed some error messages that appeared only after the first Auto-save has taken place.

No other mods are loaded.

Only running the BETA.
 
This is only me thinking out loud so don't flame me.

In 'TopPanel.lua' there is this code:
Code:
	if (iExtraHappinessPerCity ~= 0) then
		strText = strText .. "[NEWLINE]";
		strText = strText .. "  [ICON_BULLET]" .. Locale.ConvertTextKey("TXT_KEY_TP_HAPPINESS_CITY_COUNT", iExtraHappinessPerCity);
	end
which starts at line 866, the same line (I think) that my log has this error message:
Code:
[424376.415] Runtime Error: [string "C:\Users\Grant\Documents\My Games\Sid Meier..."]:866: bad argument #1 to 'ConvertTextKey' (string expected, got nil)

Now there is nowhere else where this text key "TXT_KEY_TP_HAPPINESS_CITY_COUNT" is generated, so maybe it was left off the "Core.sql"?

Maybe there is a flow on error with the CityView not displaying bug?
 
Well maybe not.

I added an insert command in "core.sql" for that TXT_KEY and started a game.
The lua.log shows exactly the same error. So either I have to do something extra or I'm barking up the wrong tree.:sad:

Here is the log.
 

Attachments

The errors have nothing to do with the 'Auto-save' feature.

Just started another game and without entering the "City View" generated some logs and quit.

No errors.

Some bug in the cityview.lua which I fear is beyond my scope.
 
Back
Top Bottom