Difference between revisions of "Disk.setLabel"

From ComputerCraft
Jump to navigation Jump to search
(Created page with "{{API doc function | name = disk.setLabel | description = Set the Label of a Disk. | args = {{argument|type=string|name=side}} {{argument|type=string|name=label}} | retur...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{API doc function
 
{{API doc function
 
| name = disk.setLabel
 
| name = disk.setLabel
| description = Set the Label of a Disk.
+
| description = Set the label of a disk.
 
| args =  
 
| args =  
 
   {{argument|type=string|name=side}}
 
   {{argument|type=string|name=side}}
   {{argument|type=string|name=label}}
+
   {{argument|type=string|name=label|optional=true}}
 
| returns = {{type|number}} ID
 
| returns = {{type|number}} ID
 
| part_of = [[CC:Tweaked]] {{API doc source link|https://github.com/SquidDev-CC/CC-Tweaked/blob/86569533e99b0ec28ad94d5d70dc452dc507c42a/src/main/resources/assets/computercraft/lua/rom/apis/disk.lua#L16}}
 
| part_of = [[CC:Tweaked]] {{API doc source link|https://github.com/SquidDev-CC/CC-Tweaked/blob/86569533e99b0ec28ad94d5d70dc452dc507c42a/src/main/resources/assets/computercraft/lua/rom/apis/disk.lua#L16}}
Line 12: Line 12:
 
     | name = Set disk label
 
     | name = Set disk label
 
     | description = Sets the label of the disk inserted in the disk drive on the top to "Disk123".
 
     | description = Sets the label of the disk inserted in the disk drive on the top to "Disk123".
     | code = disk.setLabel("Disk123"))
+
     | code = disk.setLabel("top", "Disk123")
 
     }}
 
     }}
 
}}
 
}}

Latest revision as of 02:34, 27 March 2020

disk.setLabel
Function
Syntax
disk.setLabel()
Returns number ID
API disk
Source CC:Tweaked (source)

Set the label of a disk.

ExampleExampleSet disk label
Sets the label of the disk inserted in the disk drive on the top to "Disk123".
Code
disk.setLabel("top", "Disk123")