My code crashes with this reason:too long without yielding.
How to fix this?
Here is code:
red = component.proxy(component.list("redstone")())
local bottom = 0
local back = 2
function wait(seconds)
local start = os.time()
repeat until os.time() > start + seconds
end
while true do
if red.getInput(bottom) > 0 then
wait(50)
red.setOutput(back, 15)
wait(5)
else
red.setOutput(back, 0)
end end
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
My code crashes with this reason:too long without yielding.
How to fix this?
Here is code:
Link to post
Share on other sites