Difference between revisions of "Computer (API)"

From ComputerCraft Wiki
Jump to: navigation, search
m (Recreated the page)
m (Forgot 'odd' parameter)
Line 10: Line 10:
 
|[[computer.turnOn|''computer''.turnOn]]()
 
|[[computer.turnOn|''computer''.turnOn]]()
 
|{{type|nil}}
 
|{{type|nil}}
|Turns on the [[Computer]] or [[Turtle]].}}
+
|Turns on the [[Computer]] or [[Turtle]].
 +
|odd}}
  
 
{{API table/row
 
{{API table/row
Line 20: Line 21:
 
|[[computer.reboot|''computer''.reboot]]()
 
|[[computer.reboot|''computer''.reboot]]()
 
|{{type|nil}}
 
|{{type|nil}}
|Reboots the [[Computer]] or [[Turtle]].}}
+
|Reboots the [[Computer]] or [[Turtle]].
 +
|odd}}
  
 
{{API table/row
 
{{API table/row

Revision as of 15:16, 9 April 2014

This API requires the use of a wrapped peripheral!
This API does not behave like a regular API, to use it you must first wrap the peripheral and call the methods on the wrapped object. For more information see this page.


The Computer API is a peripheral API that allows computers and turtles to interact with other computers and turtles.
computer stands for the variable you wrapped the computer to.

Grid disk.png  Computer (API)
Function Return values Description
computer.turnOn() nil Turns on the Computer or Turtle.
computer.shutdown() nil Shuts off the Computer or Turtle.
computer.reboot() nil Reboots the Computer or Turtle.
computer.getID() number computerID Gets the ID of the Computer or Turtle.