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

[Question]Permanent Loop stops

Started by TheOnlyAnti, 16 March 2012 - 07:33 AM
TheOnlyAnti #1
Posted 16 March 2012 - 08:33 AM
I made a program to run a beacon above my town that sets a output side, then sleeps for a second then outputs another side in an infinite loop. However, after about a minute or two of running it stops and goes to the main terminal window.

How can i make it infinitely run without having to continually re-run the program?

Thanks in advance,
The One and Only Anti
Advert #2
Posted 16 March 2012 - 08:40 AM
Post your code.
TheOnlyAnti #3
Posted 16 March 2012 - 05:47 PM
http://pastebin.com/PGQJx7K6

Im pretty sure i have an infinite loop, but it seems to stop.
Advert #4
Posted 16 March 2012 - 07:57 PM
I'd guess your computer is restarting. Try renaming that program as startup.

You can also use

while true do
...
end
instead of checking a variable that never changes.
TheOnlyAnti #5
Posted 16 March 2012 - 11:23 PM
Alright thanks, will try that