Code: Select all
[23:25:22][12068]+++++++++++++++++++++++++ event:Bohm
[23:25:22][12068]Bohm
[23:25:22][12068]+++++++++++++++++++++++++ event:secret
[23:25:22][12068]Bohm
[23:25:22][12068]game/game_research.lua:804(global UpdateUnit) game/game_research.lua:804: attempt to index local 'unit' (a nil value)
Code: Select all
function UpdateUnit(unit, techs)
--LogUi("update start")
-- copy unit techs
if techs == nil then
unit.luaData.unitTechs = utils.deepcopy(unit.faction.luaData.factionTechs)
else
unit.luaData.unitTechs = utils.deepcopy(techs)
end
--FIXME: unit must use icon at time of purchase, not latest one
-- If faction has the unit type
if unit.faction.luaData.unitLevel[unit.prototype.name] ~= nil then
while unit.level < unit.faction.luaData.unitLevel[unit.prototype.name] do
unit:Upgrade()
EasterEgg_RedBaron(unit)
end
end
-- LogUi("update end")
end


