Ok thanks for your time, I notice that i fail to add context:
I was playing multiplayer and only happens when select one tab on the army control menu the "Army Stats" and when all units die the error disappear ho and got other error message.
here is the save file:
https://drive.google.com/file/d/1cAktiDtm7KeWi6WAXpNdhAf_lkOeS3Oz/view?usp=drive_link
new error:
The mod Enemy Race Manager (2.0.18) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event enemyracemanager::on_lua_shortcut (ID 38)
enemyracemanager/gui/army_tabs/unit_control.lua:53: attempt to perform arithmetic on local 'auto_deploy_units' (a nil value)
stack traceback:
enemyracemanager/gui/army_tabs/unit_control.lua:53: in function '?'
enemyracemanager/gui/army_control_window.lua:165: in function 'open_tab'
enemyracemanager/gui/army_control_window.lua:181: in function 'toggle_main_window'
enemyracemanager/gui/events.lua:507: in function '?'
enemyracemanager/gui/events.lua:514: in function 'handler'
core/lualib/event_handler.lua:47: in function <core/lualib/event_handler.lua:45>
Thanks.