Difference between revisions of "Computer.reboot"

From ComputerCraft Wiki
Jump to: navigation, search
m (Tidied up source, made code multi-line)
Line 1: Line 1:
{{lowercase}}
 
 
{{Function
 
{{Function
|name=computer.reboot
+
|name=computer.reboot
|api=peripheral
+
|api=peripheral
|addon=ComputerCraft
+
|addon=ComputerCraft
|desc=Reboots a computer wrapped to the "computer" variable
+
|desc=Reboots a computer or turtle wrapped to the "computer" variable
|examples=
+
|examples={{Example
{{Example
+
|desc=Reboots 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=
|code=local handle = peripheral.wrap("right") handle.reboot()
+
  local handle = peripheral.wrap("right")  
|output=reboots any computer to the right of the computer/turtle.
+
handle.reboot()
 +
|output=Reboots any computer or turtle to the right of the calling machine.
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:Lua_Core_Functions]]
 
[[Category:Lua_Core_Functions]]

Revision as of 02:47, 12 May 2013

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

Examples

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