I'm making a command for a program ".exit" and it needs to stop the program immediately.
I don't want to hear about os.reboot() and os.shutdown().
9 replies to this topic
#1
Posted 22 July 2012 - 12:44 PM
#2
Posted 22 July 2012 - 12:57 PM
you mean just stop or stop and wait for something?
#4
Posted 22 July 2012 - 01:03 PM
you need only use "return" or you can use "error()" while you are in function
#6
Posted 23 July 2012 - 10:01 AM
No need for that just end your program.And when it ends it will automaticly "put" you in the OS command line.
#7
Posted 24 July 2012 - 04:10 AM
shell.programs() perhaps?
that should exit whatever you are running immediately
that should exit whatever you are running immediately
#8
Posted 24 July 2012 - 08:27 AM
^ Will not. It continues if you are in a loop.
Run a function that simply doesn't exist. It'll return an error
/> only problem is no-clear.
If inside a loop (while true) then use break.
Run a function that simply doesn't exist. It'll return an error
If inside a loop (while true) then use break.
#9
Posted 21 November 2012 - 01:00 PM
i had the same problem,
you can use an if statment like so
while true do
if input == x then
elseif input == "2" then
elseif input == "3" then
elseif input == "4" then
break
else
end
end
yo can break the loop when you want, just by adding "break", you can also as i did use multiple elseif statments and place the brake where you need it.
I hope this help you
you can use an if statment like so
while true do
if input == x then
elseif input == "2" then
elseif input == "3" then
elseif input == "4" then
break
else
end
end
yo can break the loop when you want, just by adding "break", you can also as i did use multiple elseif statments and place the brake where you need it.
I hope this help you
Edited by AlejoAy, 21 November 2012 - 01:01 PM.
#10
Posted 21 November 2012 - 01:22 PM
you could use.
term.clear() endat the end of your program.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












