What i'm trying to do is, say a chest slot becomes empty, it return "nil".
I want a while loop to stop at the slot id, call a function and put a item in that slot, then resume again.
So….Example
Chest has 6 slots, slot 4 becomes empty and returns "nil" while loop pauses at that slot and calls a function to put soomthing in that slot, once slot is filled the while loop resumes.
I'm using rs.setOutput for a test
I tried
while var do
That just ends the programAlso tried
if var == nil then
rs.setOutput("top",false)
else
rs.setOutput("top",true)
end
But that just toggles the redstone off when it hits nil then turns it back on when it goes to next slot