Difference between revisions of "Computer.turnOn"

From ComputerCraft Wiki
Jump to: navigation, search
m (moved Computer.turnOn() to Computer.turnOn: Removed parenthesis to match other function pages.)
(Fixed/Expanded)
 
Line 1: Line 1:
 +
{{Lowercase}}
 
{{Function
 
{{Function
|name=computer.turnOn
+
|name=''computer''.turnOn
|api=peripheral
+
|returns={{type|nil}}
|addon=ComputerCraft
+
|api=peripheral
|desc=Turns on a computer or turtle wrapped to the "computer" variable
+
|addon=ComputerCraft
|examples={{Example
+
|desc=Turns on a [[Computer]] or [[Turtle]] wrapped to the <var>computer</var> variable.
|desc=Turns on the computer or turtle on the right side of the calling machine.
+
|examples={{Example
|code=
+
|desc=Turns on the computer or turtle on the right side of the calling machine.
  local handle = peripheral.wrap("right")  
+
|code=
  handle.turnOn()
+
local computer = [[peripheral.wrap]]("right")
|output=Turns on any computer to the right of the computer/turtle.
+
   
 +
'''computer.turnOn()'''
 +
|output=Turns on any computer to the right of the computer/turtle.
 
}}
 
}}
 
}}
 
}}
  
 
[[Category:Lua_Core_Functions]]
 
[[Category:Lua_Core_Functions]]

Latest revision as of 10:55, 1 June 2014


Grid Redstone.png  Function computer.turnOn
Turns on a Computer or Turtle wrapped to the computer variable.
Syntax computer.turnOn()
Returns nil
Part of ComputerCraft
API peripheral

Examples

Grid paper.png  Example
Turns on the computer or turtle on the right side of the calling machine.
Code
local computer = peripheral.wrap("right")

computer.turnOn()
Output Turns on any computer to the right of the computer/turtle.