wow.. that image is perfect! that alone wants me to play KP. love the logo! You should definitely put that picture everywhere where people might read about KP, and use the logo everywhere!
[f=0000824] LuaRules::RunCallIn: error = 2, GameFrame, [string "LuaRules/Gadgets/luacob.lua"]:51: attempt to index field '?' (a nil value) stack traceback: [string "LuaRules/Gadgets/luacob.lua"]:51: in function 'GameFrame' [string "LuaRules/Gadgets/hotfixes.lua"]:43: in function <[string "LuaRules/Gadgets/hotfixes.lua"]:40> (tail call): ?
Spring.Echo("Error: Failed to replace team["..u.team.."] "..UnitDefs[Spring.GetUnitDefID(u.unit)].humanName.." with "..UnitDefNames[u.target].humanName)
Sure you don't mean Line46?
Code:
for i = 1, c.n do
And aowww, I thought KP was free of .n, but seems not, I'll still have to make a new version for new Spring.
Spring.Echo("Error: Failed to replace team["..u.team.."] "..UnitDefs[Spring.GetUnitDefID(u.unit)].humanName.." with "..UnitDefNames[u.target].humanName)
Sure you don't mean Line46?
Code:
for i = 1, c.n do
And aowww, I thought KP was free of .n, but seems not, I'll still have to make a new version for new Spring.
Attempt to index field "?" means an index that's not the first (then it knows the name) nor the last (then it just returns nil) in the chain was nil. My guess is that one of the parts in [] is invalid so you get a nil out of one of the UnitDefs maps and then attempt to get an entry from them which triggers the message. So either u.target or GetUnitDefID(u.unit) is not a valid entry.
[f=0000824] LuaRules::RunCallIn: error = 2, GameFrame, [string "LuaRules/Gadgets/luacob.lua"]:51: attempt to index field '?' (a nil value) stack traceback: [string "LuaRules/Gadgets/luacob.lua"]:51: in function 'GameFrame' [string "LuaRules/Gadgets/hotfixes.lua"]:43: in function <[string "LuaRules/Gadgets/hotfixes.lua"]:40> (tail call): ?
I don't manage to replicate this particular error. Do you have a replay and the Spring version you used, or can you tell me what you were doing, or what happened using?
Note: There do is a bug around there, related to .n, which happens when a unit is morphing, and which comes out in infolog as: [f=0004364] LuaRules::RunCallIn: error = 2, GameFrame, [string "LuaRules/Gadgets/luacob.lua"]:46: 'for' limit must be a number stack traceback: [string "LuaRules/Gadgets/luacob.lua"]:46: in function 'GameFrame' [string "LuaRules/Gadgets/hotfixes.lua"]:43: in function <[string "LuaRules/Gadgets/hotfixes.lua"]:40> (tail call): ?
However, the bug you had, while happening in close proximity code source wise, is different, and I wonder what triggered your bug.
Yeah, but it redefines the function to one that does nothing if it doesn't exist, in some of the earliest executed part of the Lua. So that (at least in theory) it's retrocompatible with older Spring engine.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum