I currently have installed LuaCombinator3 version 0.17.9 running on factorio 0.17.79 (build 47865, win64, steam) and I just dont seem to be able to run a fairly straightforward piece of code (see under problem description).
When I use script.on_nth_tick, it doesnt run
when I execute the isRecycled() function it only runs once and as expected.
It basically is a recycler, a constant combinator (which sets a requester chest), chest (where the disassembled parts end up in) and a lamp(which turns on when the recycler couldnt recycled something). When the recycler cant recycle something the product ends up unassembled in the chest (where normally disassembled parts end up). So when I run isRecycled function it checks if there are equal keys between the greennet (contents of chest) with rednet (contents). It works but it just wont update script.on_tick or script.on_nth_tick. No logged issues, no errors but a silent shitshow. I probably dont get something specific of your mod, or I am just being stupid wth the factorio api. I am very new still. Anyways, without having error messages or logs to show for errors all I can do is some effort to describe the problem. Which I just did. Now the code:
function isRecycled()
for name, value in pairs(greennet) do
output={}
if rednet[name]~=nil then
output["signal-A"]=1
else
output["signal-A"]=0
end
end
end
script.on_nth_tick(100,
function(event)
isRecycled()
end)