Posted 23 March 2013 - 01:45 PM
Hello, I am converting the old game "Hurdles" into an arcade cabinet. I have gotten down the following parts:
Button-press jumping
restart on monitor via separate one-line startup program that starts monitor with hurdles
"while true do" loop before game starts that waits for redstone input with a "Press Button" notification on screen in order to start game.
All this works well, except the loop. Instead of running indefinitely, the OS terminates it because it went too long without "yielding"
What?
Can I have some help here? How can I make an indefinite "wait for input" sort of loop?
By the way, here is the loop itself.
"Pressbios:83: Too long without yielding"
So, yeah.
Button-press jumping
restart on monitor via separate one-line startup program that starts monitor with hurdles
"while true do" loop before game starts that waits for redstone input with a "Press Button" notification on screen in order to start game.
All this works well, except the loop. Instead of running indefinitely, the OS terminates it because it went too long without "yielding"
What?
Can I have some help here? How can I make an indefinite "wait for input" sort of loop?
By the way, here is the loop itself.
while true do
term.setCursorPos(x/2,y/2)
write("Press Button")
if redstone.getInput("left") == true then
break
end
end
The error is"Pressbios:83: Too long without yielding"
So, yeah.