Squad spawner errors in Pre-M (v0.07)

From infolog.txt:

[ 63944] LuaRules::RunCallIn: error = 2, GameFrame, [string “LuaRules/Gadgets/unit_squadspawner.lua”]:85: GiveOrderToUnit(): Bad unitID
stack traceback:
[C]: in function ‘GiveOrderToUnit’
[string “LuaRules/Gadgets/unit_squadspawner.lua”]:85: in function ‘GameFrame’
[string “LuaRules/gadgets.lua”]:928: in function <[string “LuaRules/gadgets.lua”]:926>
(tail call): ?

I think it occurred when a partisan shack had spawned a partisan contingent. I’ve also noticed another issue that might be related to this since a few svn revisions back. The issue is that every once in a while, the “rally point” I set for the HQ or barracks (a move order) gets replaced by a fight order to the edge of the map (to the west, since I usually test in village crossing and I spawn on the start point halfway down the map on the west side).

I built partisans in v07 and had no such errors, never noticed waypoints changing to fight orders as well. Must be something that only happens under very specific circumstances.

Any chance you (or another team in the game) had hit the unit limit at that time?

I fixed a bug that looked a lot like this (can’t check whether it was exactly the same one currently) not long after Pre-M v0.07 was released.

It’s possible that I had hit the unit limit but I’m not certain. I’ll lower the unit limit to a very low value and test again. Is there any way to visualize the current unit count?

/spectator and then ctrl+a