kyranf / robotarmyfactorio

A mod to add robot troop units and perhaps associated support buildings and items to produce and control them.
MIT License
35 stars 11 forks source link

unit group still invalid during selection code #182

Open kyranf opened 1 year ago

kyranf commented 1 year ago

after v0.4.17 we still get some instances of the unit group invalid while checking for squad validity during selection checks

https://mods.factorio.com/mod/robotarmy/discussion/6374a63678ccfa47fd725a94

模组 机器人军队 (0.4.17) 引发了无法恢复的错误。
请向模组作者报告此错误。

Error while running event robotarmy::on_player_selected_area (ID 51)
LuaUnitGroup API call when LuaUnitGroup was invalid.
stack traceback:
[C]: in function 'index'
__robotarmy/robolib/Squad.lua:640: in function 'validateSquadIntegrity'
robotarmy/robolib/Squad.lua:289: in function 'getClosestSquadToPos'
robotarmy/robolib/eventhandlers.lua:119: in function 'reportSelectedUnits'
robotarmy/control.lua:75: in function <robotarmy/control.lua:74>