Difference between revisions of "Os.getComputerID"

From ComputerCraft Wiki
Jump to: navigation, search
(Add alias note)
m (Changed int to number)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=os.getComputerID
 
|name=os.getComputerID
|returns=[[int (type)|int]] the disk ID
+
|returns=[[number (type)|number]] ID
 
|api=OS
 
|api=OS
 
|addon=ComputerCraft
 
|addon=ComputerCraft

Revision as of 02:54, 12 May 2013


Grid Redstone.png  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 number ID
Part of ComputerCraft
API OS

Examples

Grid paper.png  Example
Prints the computer ID.
Code
print(os.getComputerID())
Output 1