Error:
Error while running event Moon_Logic::on_tick (ID 0)
Moon_Logic/control.lua:245: attempt to index local 'k' (a number value)
stack traceback:
Moon_Logic/control.lua:245: in function 'mlc_update_output'
Moon_Logic/control.lua:719: in function 'run_moon_logic_tick'
Moon_Logic/control.lua:763: in function <Moon_Logic/control.lua:741>
Offending Code in MLC:
out = {}
for key, value in pairs(green) do
local n = _api.game.item_prototypes[key].stack_size
out[n] = out[n] + value
end
for key, value in pairs(red) do
local n = _api.game.item_prototypes[key].stack_size
out[n] = out[n] + value
end
Then input something, like Steel
Fix:
Add
if type(k) == 'number' then break end
to line 244 in control
Don't know wether this is the optimal fix, but it works for me.