Woops, you need to put "local util = require("util")" (probably at the top of your file)Keysivi wrote: Thu Dec 26, 2024 8:04 am New batch of errors
In the case of the function 'insert_trigger' in data-final-fixes.lua, there are no more errors, but there was one in control.lua:
[/code]Code: Select all
__ElectricPoweredBelts__/control.lua:28: attempt to index global 'util' (a nil value) stack traceback: __ElectricPoweredBelts__/control.lua:28: in main chunk
Did you not copy the insert trigger function from my first suggestion?Keysivi wrote: Thu Dec 26, 2024 8:04 am In the case of the function 'get_trigger', the error seems to be the same, but now it points to 'insert_trigger'. As far as I understand, the problem is not only in the missing letter 'g'.
Code: Select all
Failed to load the following mods: __ElectricPoweredBelts__/data-final-fixes.lua:33: attempt to call global 'insert_trigger' (a nil value) stack traceback: __ElectricPoweredBelts__/data-final-fixes.lua:33: in main chunk
Now why did you do that? (It shouldn't make any difference in this particular case, but I think it's more logical the way it was)Keysivi wrote: Thu Dec 26, 2024 8:04 am I also took the liberty of replacing:with:Code: Select all
return tbl[field][1] end
It didn't change anything though...Code: Select all
end return tbl[field][1]