Math Combinator


A new combinator for math instructions like maximum, minimum, random, median and set theory like intersection and difference.

Utilities
2 years ago
0.14 - 1.1
1.46K

g Unrecoverable error

1 year, 10 months ago

Received the following error one time after many hundreds of hours playing with this mod:

The mod Math combinator (1.1.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event MathCoProcessor::on_tick (ID 0)
Index out of bounds: 21
stack traceback:
[C]: in function 'newindex'
__MathCoProcessor
/control.lua:324: in function <MathCoProcessor/control.lua:303>

1 year, 10 months ago
(updated 1 year, 10 months ago)

Follow up - This seems to happen consistently when I add efficiency module to the green circuit being monitored by a math combinator set to filter. No other item seems to cause it. This is a K2/SE run, so I think the modules may be different entities from the vanilla modules.

Edit - the specific item had nothing to do with it, was just coincidence.

1 year, 10 months ago

Issue solved. Math combinator entity only has 20 output slots, so when there were more than 20 output signals, it crashed.
Needed to add entity.item_slot_count = 100 to entity.lua (note that 100 was arbitrary and can be any number really)
Also added a check to the actual execution functions in control.lua so that if there were more than 100 outputs, it would just truncate to 20.

New response