So let me give you a simple example to how to reproduce it:
Write a recipe with
Code: Select all
results = {type="item", name="foo", amount=1}
Factorio will crash with:
Code: Select all
__core__/lualib/util.lua:792: attempt to index local 'product' (a number value)
stack traceback:
__core__/lualib/util.lua:792: in function 'normalize_recipe_product'
__core__/lualib/util.lua:808: in function 'normalize_recipe_products'
__quality__/prototypes/recycling.lua:78: in function 'add_recipe_values'
__quality__/prototypes/recycling.lua:204: in function 'generate_recycling_recipe'
__quality__/data-updates.lua:6: in main chunk
My idea here (at least) is, to add some assertion on the raw_product parameter, it should be a table. So adding code like
Code: Select all
assert(type(raw_product) == "table")
Of course, that is only the low-minimum to make code stronger. Some proper reporting with a message like "Your mod 'foo" contains a faulty results entry. It must be an array wrapping a table" is course better.