computer.getID
From ComputerCraft Wiki
(Redirected from 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 |
Examples
| Prints the ID of a computer or turtle on the right side of the calling machine. | |
| Code |
local computer = peripheral.wrap("right") print(computer.getID()) |
| Output | The ID of any computer or turtle to the right of the calling machine. |