Open eronoobos opened 8 years ago
quick fix:
local mtype = factoryMobilities[self.name][1]
local network = ai.maphandler:MobilityNetworkHere(mtype,self.position) or 0
ai.factoryBuilded[mtype][network] = (ai.factoryBuilded[mtype][network] or 0) + self.level
Probably does bad things though. The real issue is: why does MobilityNetworkHere return no network?
[f=0002309] Error: LuaRules::RunCallIn: error = 2, Initialize, [Internal Lua error: Call failure] error = 2, LuaRules/gadgets.lua, [string "luarules/gadgets/ai/BA/factoryregisterbehav..."]:128: attempt to perform arithmetic on field '?' (a nil value)
relevant lines from factoryregisterbehaviour:it's only annoying for us, because probably players won't be reloading the AI all the time