This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Sweeper's profile picture

Too long without yielding.

Started by Sweeper, 01 July 2013 - 06:22 AM
Sweeper #1
Posted 01 July 2013 - 08:22 AM
Every time I run the programme it always comes up with "programme:16: too long without yielding" and I don't know what it means, I have tried a lot of things and it doesn't work s it would be great if you knew, also there is the code and thanks.

local pos = 13
mon = peripheral.wrap("right")
mon.clear()
mon.setTextScale(2)
while true do
if pos==-6 then
pos=13
end
mon.clear()
mon.setCursorPos(7,1)
mon.write("The Zoo")
pos = pos-1
end
Lyqyd #2
Posted 01 July 2013 - 02:07 PM
Split into new topic.

It means your program isn't yielding to allow other computers to run. Put a sleep(0.5) right before the `end` near the bottom of your program.
Sweeper #3
Posted 01 July 2013 - 04:11 PM
thanks it now works