Difference between revisions of "Computer.reboot"

From ComputerCraft Wiki
Jump to: navigation, search
Line 9: Line 9:
 
{{Example
 
{{Example
 
|desc=Shuts down the computer or turtle on the right side of the calling machine.
 
|desc=Shuts down the computer or turtle on the right side of the calling machine.
|code=local handle = peripheral.wrap("right")
+
|code=local handle = peripheral.wrap("right") \n handle.reboot()
|handle.reboot()
+
 
|output=reboots any computer to the right of the computer/turtle.
 
|output=reboots any computer to the right of the computer/turtle.
 
}}
 
}}

Revision as of 13:58, 11 February 2013


Grid Redstone.png  Function computer.reboot
Reboots a computer wrapped to the "computer" variable
Syntax computer.reboot((string) side)
Returns nil
Part of ComputerCraft
API peripheral

Examples

Grid paper.png  Example
Shuts down the computer or turtle on the right side of the calling machine.
Code
local handle = peripheral.wrap("right") \n handle.reboot()
Output reboots any computer to the right of the computer/turtle.