Difference between revisions of "Computer.shutdown"

From ComputerCraft Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
{{Function
 
{{Function
|name=computer.wrap
+
|name=computer.shutdown
|args= [[string (type)|(string)]] side
+
 
|api=peripheral
 
|api=peripheral
 
|addon=ComputerCraft
 
|addon=ComputerCraft
Line 9: Line 8:
 
{{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") handle.shutdown()
|handle.shutdown()
+
 
|output=Shuts down any computer to the right of the computer/turtle.
 
|output=Shuts down any computer to the right of the computer/turtle.
 
}}
 
}}

Revision as of 14:00, 11 February 2013


Grid Redstone.png  Function computer.shutdown
Shuts down a computer wrapped to the "computer" variable
Syntax computer.shutdown()
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") handle.shutdown()
Output Shuts down any computer to the right of the computer/turtle.