Difference between revisions of "Disk.hasData"
From ComputerCraft Wiki
m (Use type template) |
Magiczocker (Talk | contribs) m |
||
Line 5: | Line 5: | ||
|api=disk | |api=disk | ||
|returns={{Type|boolean}} whether the item is a floppy | |returns={{Type|boolean}} whether the item is a floppy | ||
− | |desc=Checks whether the current disk is a [[Floppy Disk|floppy disk]], as opposed to a [ | + | |desc=Checks whether the current disk is a [[Floppy Disk|floppy disk]], as opposed to a [https://minecraft.gamepedia.com/Music_Disc music disc] or other item. |
|addon=ComputerCraft | |addon=ComputerCraft | ||
|examples= | |examples= |
Latest revision as of 07:02, 4 August 2020
Function disk.hasData | |
Checks whether the current disk is a floppy disk, as opposed to a music disc or other item. | |
Syntax | disk.hasData(string side) |
Returns | boolean whether the item is a floppy |
Part of | ComputerCraft |
API | disk |
Examples
Example | |
Checks for what is in the bottom drive | |
Code |
print(disk.hasData("bottom")) |
Output | true if the item is a floppy, otherwise false |