Difference between revisions of "Computer (API)"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "'''''computer'' stands for the variable you wrapped the computer to.''' ''Example:'' computer = peripheral.wrap( "top" ) {| class="wikitable" !Method name !Description |- |co...")
 
m (Stating that computer.getID returns nothing if the observed computer/turtle is not running.)
Line 16: Line 16:
 
|-
 
|-
 
|computer.getID()
 
|computer.getID()
|Gets the ID of the Computer or Turtle.
+
|Gets the ID of the Computer or Turtle if it is running, otherwise returns nothing.
 
|}
 
|}
  
 
[[Category: Peripheral APIs]]
 
[[Category: Peripheral APIs]]

Revision as of 13:37, 8 September 2013

computer stands for the variable you wrapped the computer to. Example: computer = peripheral.wrap( "top" )

Method name Description
computer.turnOn() Turns on the Computer or Turtle.
computer.shutdown() Shuts off the Computer or Turtle.
computer.reboot() Reboots the Computer or Turtle.
computer.getID() Gets the ID of the Computer or Turtle if it is running, otherwise returns nothing.