Difference between revisions of "Os.shutdown"
From ComputerCraft Wiki
(Undo revision 1945 by 91.121.27.33 (talk)) |
MKlegoman357 (Talk | contribs) m (Fixed/Expanded) |
||
| (3 intermediate revisions by one other user not shown) | |||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=os.shutdown | |name=os.shutdown | ||
| − | |returns= | + | |returns={{type|nil}} |
| − | |api= | + | |api=OS |
|addon=ComputerCraft | |addon=ComputerCraft | ||
| − | |desc= | + | |desc=Turns off the [[Computer]], [[Turtle]] or [[Pocket Computer]]. |
|examples= | |examples= | ||
{{Example | {{Example | ||
| − | |desc= | + | |desc=Shutdowns the computer. |
| − | |code=os.shutdown() | + | |code='''os.shutdown()''' |
| + | }} | ||
| + | |notes= | ||
| + | Alternatively, you could hold {{Keypress|key=CTRL}} + {{Keypress|key=S}} for one second to shutdown the [[Computer]] outside of a program. | ||
}} | }} | ||
| − | + | [[Category:Lua_Core_Functions]] | |
| − | + | ||
| − | + | ||
Latest revision as of 22:49, 3 June 2014
| Turns off the Computer, Turtle or Pocket Computer. | |
| Syntax | os.shutdown() |
| Returns | nil |
| Part of | ComputerCraft |
| API | OS |
Examples
| Shutdowns the computer. | |
| Code |
os.shutdown() |
Additional Notes
Alternatively, you could hold CTRL + S for one second to shutdown the Computer outside of a program.