Unit/Location Hotkeys


Adds configurable shortcuts and hotkeys to center your view on a specific entity or location (and select a remote when it's a spidertron), similar to control groups in an RTS

Utilities
a month ago
1.1
194

g Crash when trying to follow an entity that no longer exists

2 months ago
(updated 2 months ago)
The mod Unit/Location Hotkeys (1.2.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event UnitLocationHotkeys::on_gui_click (ID 1)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
    [C]: in function '__index'
    __UnitLocationHotkeys__/control.lua:237: in function 'player_start_follow'
    __UnitLocationHotkeys__/control.lua:315: in function <__UnitLocationHotkeys__/control.lua:269>

I think this can be fixed by changing line 236 from

    if entity then

to

    if entity and entity.valid then
2 months ago

Thanks for the report. Updated with the suggested fix, which does appear to fix the crash.

New response