Difference between revisions of "Os.getComputerID"
From ComputerCraft Wiki
(Add return type, example output, and more notes) |
(Add alias note) |
||
Line 5: | Line 5: | ||
|api=OS | |api=OS | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Returns a number which uniquely identifies the computer and which is the name of the directory in the world’s <code>computer</code> directory containing the computer’s data. | + | |desc=Returns a number which uniquely identifies the computer and which is the name of the directory in the world’s <code>computer</code> directory containing the computer’s data. This function is also available as [[os.computerID]]. |
|examples= | |examples= | ||
{{Example | {{Example |
Revision as of 20:00, 21 April 2013
Function os.getComputerID | |
Returns a number which uniquely identifies the computer and which is the name of the directory in the world’s computer directory containing the computer’s data. This function is also available as os.computerID. | |
Syntax | os.getComputerID() |
Returns | int the disk ID |
Part of | ComputerCraft |
API | OS |
Examples
Example | |
Prints the computer ID. | |
Code |
print(os.getComputerID()) |
Output | 1 |