computer.getID
| computer.getID Function | |
|---|---|
|
Syntax computer.getID() | |
| Returns | number id |
| API | computer |
| Source | CC:Tweaked (source) |
Returns the ID of a computer.
|
|||
| Get the computer ID and print it. | |||
| Code | <nowiki>
local computer = peripheral.find("computer")
print(computer.getID())
</nowiki>
|
||
| Output | 0
|
||
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.