computer.getLabel

Returns the label of a computer peripheral. Returns nil, if the computer has no label.

ExampleGet computer label
Get computer label and print it.
Code
<nowiki>
local computer = peripheral.find("computer")
print(computer.getLabel())
    </nowiki>
Output
Computer123

computer.getLabel
Function
Syntax
computer.getLabel()
Returns string label
API computer
Source CC:Tweaked (source)
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.