disk.hasData
Checks if a disk drive has an item attached, and if that item is a floppy disk.
|
|||
Check if a floppy disk is present in the top disk drive. | |||
Code | if disk.hasData("top") then
print("The top disk drive contains a floppy disk!");
else
print("There is no floppy disk present in the top disk drive!");
end
|
||
Output | If a floppy disk is present in the top disk drive it says so, otherwise it says there are no floppy disks present. |
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
disk.hasData Function | |
---|---|
Syntax disk.hasData(
| |
Returns | boolean result |
API | disk |
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.