morph error

an strange bug preventing re-supply of ammo.

[code][ 12719] LuaRules::RunCallIn: error = 2, GameFrame, [string “LuaRules/Gadgets/unit_morph.lua”]:396: attempt to perform arithmetic on local ‘tx’ (a nil value)
stack traceback:
[string “LuaRules/Gadgets/unit_morph.lua”]:396: in function ‘StartMorph’
[string “LuaRules/Gadgets/unit_morph.lua”]:909: in function ‘GameFrame’
[string “luagadgets/gadgets.lua”]:928: in function <[string “luagadgets/gadgets.lua”]:926>
(tail call): ?

[ 14002] LuaRules::RunCallIn: error = 2, GameFrame, [string “LuaRules/Gadgets/unit_morph.lua”]:391: Invalid unitID given to GiveOrderToUnit()
stack traceback:
[C]: in function ‘GiveOrderToUnit’
[string “LuaRules/Gadgets/unit_morph.lua”]:391: in function ‘StartMorph’
[string “LuaRules/Gadgets/unit_morph.lua”]:909: in function ‘GameFrame’
[string “luagadgets/gadgets.lua”]:928: in function <[string “luagadgets/gadgets.lua”]:926>
(tail call): ?[/code]

The latter may well have been caused by the first. Hopefully fixed now but I’ve no idea really, need to study the replay to see if I can reproduce it.

Players: PPsh vs CRAIG ai
Map:1944_Kiev_V4
Game version:test-2791
Engine version: 0.81.2
Awesome rating (out of 5): BUG
Comments: I had a negative amount of ammo. I could not build any building, units and morphing units. I think the negative amount of ammo was the cause.
The CRAIG ai did nothing. It may be related to the change about starting units or related with this negative ammo.

It has been demanded to me to post Bugs related replays here. So it is what I do. (dont remove my posts, even if it is not related to the morph error)

Looking at the moderator log, the posts weren’t deleted, yuri split them off into their own thread. Problem is I can’t find that thread. Possible the forum ate it. :frowning:

Ah, he moved it into another forum:

viewtopic.php?f=8&t=1110