Difference between revisions of "Os.getComputerID"
From ComputerCraft Wiki
m (Updated references from "os" to "OS") |
(Add return type, example output, and more notes) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=os.getComputerID | |name=os.getComputerID | ||
− | |returns=the ID | + | |returns=[[int (type)|int]] the disk ID |
|api=OS | |api=OS | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc= | + | |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. |
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc= | + | |desc=Prints the computer ID. |
|code=print(os.getComputerID()) | |code=print(os.getComputerID()) | ||
+ | |output=1 | ||
}} | }} | ||
}} | }} | ||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] |
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. | |
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 |