Difference between revisions of "Os.computerID"

From ComputerCraft Wiki
Jump to: navigation, search
(edit example, also, is it os.getComputerID() or os.computerID()? clarify?)
(dunno where people got "computerID" from, it's "getComputerID")
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 
{{Function
 
{{Function
|name=os.computerID
+
|name=os.getComputerID
 
|returns=the ID of the Computer
 
|returns=the ID of the Computer
 
|api=os
 
|api=os
Line 9: Line 9:
 
{{Example
 
{{Example
 
|desc=prints the Computer ID
 
|desc=prints the Computer ID
|code=print(os.computerID())
+
|code=print(os.getComputerID())
 
}}
 
}}
 
}}
 
}}

Revision as of 10:01, 26 November 2012


Grid Redstone.png  Function os.getComputerID
returns the ID of the computer this command is executed on.
Syntax os.getComputerID()
Returns the ID of the Computer
Part of ComputerCraft
API os

Examples

Grid paper.png  Example
prints the Computer ID
Code
print(os.getComputerID())