computer.getLabel

From ComputerCraft
Jump to navigation Jump to search

computer.getLabel
Function
Syntax
computer.getLabel()
Returns string label
API computer
Source CC:Tweaked (source)

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

ExampleExampleGet computer label
Get computer label and print it.
Code
local computer = peripheral.find("computer")
print(computer.getLabel())
Output
Computer123