ERM Unit Control

by heyqule

Based off Klonan's Unit Control. Updated for Factorio 2.0 with additional features. e.g unit control groups, additional group strategies. It works with any "unit" type entity.

Tweaks
4 days ago
2.0
9.06K
Combat

b Crash when issued move command selects tree

A multiplayer server I bothered the host to include this mod crashed recently when someone accidentally selected a tree while trying to issue a move command to a Marine.

1) Action: A marine was given the move command and a tree was selected, causing the marine to attempt to follow the tree.

2) Result: The server crashed and on startup repeatedly generated a nil loop, preventing access.
Startup crashes

3) Repro, Mod test, etc.: Have not tested with other mods disabled, but ERM Unit Control is mentioned specifically in the crash log, which will be listed below.

12482.126 Error MainLoop.cpp:1468: Exception at tick 5153948: The mod ERM Unit Control (1.1.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event erm_unit_control::on_player_selected_area (ID 57)
erm_unit_control/script/uc_commands.lua:495: attempt to index local 'script_data' (a nil value)
stack traceback:
erm_unit_control/script/uc_commands.lua:495: in function 'unit_follow'
erm_unit_control/script/uc_movement.lua:336: in function 'make_follow_command'
erm_unit_control/script/uc_movement.lua:362: in function <erm_unit_control/script/uc_movement.lua:355>
(...tail calls...)
core/lualib/event_handler.lua:72: in function <core/lualib/event_handler.lua:70>
12482.126 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: "The mod ERM Unit Control (1.1.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event erm_unit_control::on_player_selected_area (ID 57)
erm_unit_control/script/uc_commands.lua:495: attempt to index local 'script_data' (a nil value)
stack traceback:
erm_unit_control/script/uc_commands.lua:495: in function 'unit_follow'
erm_unit_control/script/uc_movement.lua:336: in function 'make_follow_command'
erm_unit_control/script/uc_movement.lua:362: in function <erm_unit_control/script/uc_movement.lua:355>
(...tail calls...)
core/lualib/event_handler.lua:72: in function <core/lualib/event_handler.lua:70>"
12482.126 Info ServerMultiplayerManager.cpp:808: updateTick(5153948) changing state from(InGame) to(Failed)
12482.142 Quitting: multiplayer error.
12482.142 Info GlobalContext.cpp:775: Deleting active scenario.
12482.464 Info ServerMultiplayerManager.cpp:146: Quitting multiplayer connection.
12482.464 Info ServerMultiplayerManager.cpp:808: updateTick(18446744073709551615) changing state from(Failed) to(Closed)
12482.464 Info ServerMultiplayerManager.cpp:166: Deleting active scenario (global = true).
12482.465 Info HttpSharedState.cpp:57: Downloading https://multiplayer.factorio.com/remove-game/22789519
12482.836 Info UDPSocket.cpp:237: Closing socket
12482.837 Info UDPSocket.cpp:267: Socket closed
12482.837 Info UDPSocket.cpp:237: Closing socket
12483.000 Info UDPSocket.cpp:237: Closing socket
12483.000 Info UDPSocket.cpp:267: Socket closed
12483.000 Goodbye

9 days ago

1.1.6 fixes that.

New response