robotarmyfactorio icon indicating copy to clipboard operation
robotarmyfactorio copied to clipboard

LuaCommandable is Invalid

Open kyranf opened this issue 4 weeks ago • 1 comments

Multiple reports of crashes due to commands given to units whose Commandable interface is invalid for some reason.

The mod Robot Army (2.4.20) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event robotarmy::on_tick (ID 0)
LuaCommandable API call when LuaCommandable was invalid.
stack traceback:
[C]: in function 'index'
__robotarmy/robolib/Squad.lua:248: in function 'isAttacking'
robotarmy/robolib/SquadControl.lua:32: in function 'executeBattleAI'
robotarmy/robolib/SquadControl.lua:18: in function 'updateSquad'
robotarmy/robolib/eventhandlers.lua:89: in function 'processSquadUpdatesForTick'
robotarmy/robolib/eventhandlers.lua:446: in function 'tickForces'
robotarmy/robolib/eventhandlers.lua:559: in function <robotarmy/robolib/eventhandlers.lua:556>
Error while running event robotarmy::on_tick (ID 0)
LuaCommandable API call when LuaCommandable was invalid.
stack traceback:
[C]: in function 'index'
__robotarmy/robolib/retreat.lua:41: in function 'orderSquadToRetreat'
robotarmy/robolib/SquadControl.lua:48: in function 'executeBattleAI'
robotarmy/robolib/SquadControl.lua:18: in function 'updateSquad'
robotarmy/robolib/eventhandlers.lua:89: in function 'processSquadUpdatesForTick'
robotarmy/robolib/eventhandlers.lua:446: in function 'tickForces'
robotarmy/robolib/eventhandlers.lua:559: in function <robotarmy/robolib/eventhandlers.lua:556>

This occurs in a few areas, and needs resolving for anywhere we try to issue commands using the commandable parameter of a LuaEntity

kyranf avatar Jan 27 '25 22:01 kyranf