Difference between revisions of "Os.setComputerLabel"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) m (Fixed/Expanded) |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=os.setComputerLabel | |name=os.setComputerLabel | ||
− | |args= | + | |args={{type|string}}/{{type|nil}} label |
− | |returns= | + | |returns={{type|nil}} |
− | |api= | + | |api=OS |
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc= | + | |desc=Sets or resets the label of the computer to <var>label</var>. If called with no parameters resets the label. The label can be read with [[os.getComputerLabel]] and viewed in the item tooltip if the computer is broken. |
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc= | + | |desc=Sets the Computer label to "My Computer". |
− | |code=os.setComputerLabel("My Computer") | + | |code='''os.setComputerLabel("My Computer")''' |
}} | }} | ||
}} | }} | ||
+ | |||
+ | [[Category:Lua_Core_Functions]] |
Latest revision as of 22:31, 3 June 2014
Function os.setComputerLabel | |
Sets or resets the label of the computer to label. If called with no parameters resets the label. The label can be read with os.getComputerLabel and viewed in the item tooltip if the computer is broken. | |
Syntax | os.setComputerLabel(string/nil label) |
Returns | nil |
Part of | ComputerCraft |
API | OS |
Examples
Example | |
Sets the Computer label to "My Computer". | |
Code |
os.setComputerLabel("My Computer") |