Difference between revisions of "Disk.isPresent"
From ComputerCraft Wiki
m (Corrected mapping from "Boolean" to "Boolean (type)") |
(Add description and fix to talk about any item, not just a disk) |
||
Line 6: | Line 6: | ||
|returns=[[boolean_(type)|boolean]] something is in the disk drive | |returns=[[boolean_(type)|boolean]] something is in the disk drive | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
+ | |desc=Checks whether any item at all is in the disk drive. | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=Checks whether | + | |desc=Checks whether something is in the bottom disk drive or not |
|code=print(disk.isPresent("bottom")) | |code=print(disk.isPresent("bottom")) | ||
− | |output=true if there is | + | |output=true if there is an item, otherwise false |
}} | }} | ||
}} | }} | ||
[[Category:API_Functions]] | [[Category:API_Functions]] |
Revision as of 18:26, 21 April 2013
Function disk.isPresent | |
Checks whether any item at all is in the disk drive. | |
Syntax | disk.isPresent(string side) |
Returns | boolean something is in the disk drive |
Part of | ComputerCraft |
API | disk |
Examples
Example | |
Checks whether something is in the bottom disk drive or not | |
Code |
print(disk.isPresent("bottom")) |
Output | true if there is an item, otherwise false |