Posted 29 April 2012 - 02:47 AM
Is there a way to make a program where you cannot exit and it continuously runs?
while true do
insert code here
end
while true do
some stuff
if input == "exit" then -- can be whatever you want just an example
break -- will stop the while loop
end
end
You can use an infinite while loopwhile true do insert code here end
The only way to stop that will be with either ctrl+t, ctrl+r, or ctrl+s.
Well or if you tell it to break the loop by doing something likewhile true do some stuff if input == "exit" then -- can be whatever you want just an example break -- will stop the while loop end end
os.pullEvent = os.pullEvenRaw while true do insert code here end
The only way to stop that will be with eitherctrl+t, ctrl+r, or ctrl+s.
Well or if you tell it to break the loop by doing something likeos.pullEvent = os.pullEvenRaw while true do some stuff if input == "exit" then -- can be whatever you want just an example break -- will stop the while loop end end
You can use an infinite while loopwhile true do insert code here end
The only way to stop that will be with either ctrl+t, ctrl+r, or ctrl+s.
Well or if you tell it to break the loop by doing something likewhile true do some stuff if input == "exit" then -- can be whatever you want just an example break -- will stop the while loop end end
Like above, you can add os.pullEvent = os.pullEventRaw to your program. Like this:os.pullEvent = os.pullEvenRaw while true do insert code here end
The only way to stop that will be with eitherctrl+t, ctrl+r, or ctrl+s.
Well or if you tell it to break the loop by doing something likeos.pullEvent = os.pullEvenRaw while true do some stuff if input == "exit" then -- can be whatever you want just an example break -- will stop the while loop end end
Have you tried that? It won't work, you can't make a variable (the pullEvent function) inside a table (the os api table) local.local os.pullEvent = os.pullEventRaw?