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

shell.exit()

Started by 3istee, 11 March 2012 - 03:53 PM
3istee #1
Posted 11 March 2012 - 04:53 PM
Hello,
I'd like to know what shell.exit() does.

Because as I used it, it did nothing.
I thought it would exit the program (I think it's described so, but I'm not sure), has it another use?
And is there any other possibility to exit a program without using huge if clauses?

thanks
TNTeener #2
Posted 11 March 2012 - 05:45 PM
This function closing computer and print "Goodbye"
Luanub #3
Posted 12 March 2012 - 03:41 AM
This function closing computer and print "Goodbye"

According to the wiki it is supposed to "Exits the program"

os.shutdown() does what you described.

@3istee I get the same results. I have tried a couple of things and I can not get it to work either. If I find a way to get it to work I'll let you know.

Okay so I was wrong after playing with it some it does the exact same thing as os.shutdown().

Whats the code that you're trying to get to exit? You probably just need to get your loop to break and let the code run to the end.
Edited on 12 March 2012 - 03:05 AM