From ComputerCraft Wiki
Revision as of 11:03, 1 June 2014 by MKlegoman357 (Talk | contribs) (Variable renaming)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Grid Redstone.png  Function computer.getID
Returns the ID of a Computer or Turtle wrapped to the computer variable.
Syntax computer.getID()
Returns number computerID
Part of ComputerCraft
API peripheral


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

Output The ID of any computer or turtle to the right of the calling machine.