abaines / Resource-Marker

Factorio Mod
Other
5 stars 7 forks source link

Error on delete or retag #28

Closed mkaito closed 1 year ago

mkaito commented 1 year ago

I'm running Pyanodons, but I'm not sure that's related. Happens on both retag and delete (I assume the former calls the latter).

Error while running command "resourcemarker": __resourceMarker__/control.lua:541: attempt to perform arithmetic on local 'cutoff' (a nil value)
stack traceback:
    __resourceMarker__/control.lua:541: in function '_get_ore_name'
    __resourceMarker__/control.lua:573: in function 'clear_map_tags_and_data'
    __resourceMarker__/control.lua:597: in function 'reset_map_tags_and_data'
    __resourceMarker__/control.lua:658: in function <__resourceMarker__/control.lua:614>

Edit: had a peek at the code. I guess some Py ore names don't have spaces? Adding a fallback value for cutoff should do the trick.

Edit edit: Yep, setting it to 0 if nil seems to fix it.