[LUA] New Specialist Problem

bane_

Howardianism High-Priest
Joined
Nov 27, 2013
Messages
1,559
I've tried to add a Citizen using these two guides.

Initially, it worked, but the icon was the usual green one. I'm not sure how helpful this tidbit is, because I changed a few things - that I don't remember :( - until it broke. Maybe it has something to do with the error, maybe not.

I've annexed the mod, in case you need to look at the code.

Here is what I got from lua.log:
Code:
[13560.215] Runtime Error: C:\Users\wbcbane_\Documents\My Games\Sid Meier's Civilization 5\MODS\[L5R] Game Changes (v 1)\Lua\CityView.lua:489: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[13567.952] Runtime Error: C:\Users\wbcbane_\Documents\My Games\Sid Meier's Civilization 5\MODS\[L5R] Game Changes (v 1)\Lua\CityView.lua:489: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)

This is line 489-491:
Code:
if (iCultureFromSpecialist > 0) then
				ToolTipString = ToolTipString .. " +" .. iCultureFromSpecialist .. "[ICON_CULTURE]";
			end

This is how it looks in the city view:
Spoiler :
attachment.php


As far as I can tell, it has nothing to do with the missing text, because I tried to add the new Specialist to the Palace through <update> and the error persisted.
Any ideas?
 
Now I have a problem with this:

Code:
local pSpecialistInfo = GameInfo.Specialists[iSpecialistID];

Lua.log
Code:
[18070.999] Runtime Error: C:\Users\wbcbane_\Documents\My Games\Sid Meier's Civilization 5\MODS\[L5R] Game Changes (v 1)\Lua\CityView.lua:489: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[18073.589] Runtime Error: C:\Users\wbcbane_\Documents\My Games\Sid Meier's Civilization 5\MODS\[L5R] Game Changes (v 1)\Lua\CityView.lua:489: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
 
Back
Top Bottom