Resource Map Label Marker Fork

by zinful

Creates resource map label markers when chunks get generated and charted. 2.1 fork of Resource Map Label Marker by Kizrak.

Utilities
2 months ago
2.1
346
Environment Mining

b Error on map creation

10 days ago
(updated 10 days ago)

Hello. I've tried to use your fork while starting a 2.1 save. Unfortunately, the mod prevents creation of the map, returning the following error.
I'm playing with a few planet mods (Lignumis, Ribbonia).

The mod Resource Map Label Marker Fork (1.0.1) caused a non-recoverable error. Please report this error to the mod author.

Error while running event resource-map-label-marker-fork::on_init()
__resource-map-label-marker-fork__/global_lib.lua:52: attempt to compare two nil values

stack traceback:
__resource-map-label-marker-fork__/global_lib.lua:52: in function <__resource-map-label-marker-fork__/global_lib.lua:51> [C]: in function 'sort'
__resource-map-label-marker-fork__/global_lib.lua:55: in function 'calculatelconTypes'
__resource-map-label-marker-fork__/control.lua:453: in function <__resource-map-label-marker-fork__/control.lua:452>

Looking in the code at these lines, there's a sorting comparison checking for the probability of obtaining a given resource in a "products" list. Except this property isn't always a defined value, so it ends up not working.

New response