Difference between revisions of "Disk.hasAudio"
From ComputerCraft Wiki
(Take better description from function table on API page) |
m (Use type template) |
||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=disk.hasAudio | |name=disk.hasAudio | ||
| − | |args= | + | |args={{Type|string}} side |
|api=disk | |api=disk | ||
| − | |returns= | + | |returns={{Type|boolean}} whether there is audio saved on the disk |
|addon=ComputerCraft | |addon=ComputerCraft | ||
|desc=Checks whether the current disk is a [http://www.minecraftwiki.net/wiki/Music_Discs music disk], as opposed to a [[Floppy Disk|floppy disk]] or other item. | |desc=Checks whether the current disk is a [http://www.minecraftwiki.net/wiki/Music_Discs music disk], as opposed to a [[Floppy Disk|floppy disk]] or other item. | ||
Revision as of 19:12, 22 April 2013
| Checks whether the current disk is a music disk, as opposed to a floppy disk or other item. | |
| Syntax | disk.hasAudio(string side) |
| Returns | boolean whether there is audio saved on the disk |
| Part of | ComputerCraft |
| API | disk |
Examples
| Checks for audio saved on the disk in the bottom drive | |
| Code |
print(disk.hasAudio("bottom"))
|
| Output | true if there is audio, otherwise false |