Science Spread


Helper library to safely and consistently spread science packs around the tech tree.

Internal
10 days ago
2.0 - 2.1
7.07K

b error when science pack has no subgroup (attempt to compare nil with string)

11 days ago
(updated 11 days ago)

Hi!

I've encountered this: Error ModManager.cpp:1786: Failed to load mod "science-spread": __science-spread__/sorting.lua:112: attempt to compare nil with string

It's because they https://codeberg.org/Neomorphos/nuclear-steps/src/commit/45e434d4869307fa479e48102c033fa45c3daa96/prototypes/item.lua#L229 don't define a subgroup, which leads to the error, I'm not 100% sure why exactly.

I quick-hacked it by adding this right before line sorting.lua#L112:

if not order1.group or not order2.group then
    return false
end

Factorio starts again, but I don't know whether that's a good way to fix it.

10 days ago

I got a separate report for it, and already developed cleaner a fix. :)
That cause is exactly where I got without looking at nuclear steps.

10 days ago

perfect, thanks for the quick fix! :-)

New response