Difference between revisions of "Disk.isPresent"

From ComputerCraft Wiki
Jump to: navigation, search
(Add description and fix to talk about any item, not just a disk)
m (Use type template)
 
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=disk.isPresent
 
|name=disk.isPresent
|args=[[string (type)|string]] side
+
|args={{Type|string}} side
 
|api=disk
 
|api=disk
|returns=[[boolean_(type)|boolean]] something is in the disk drive
+
|returns={{Type|boolean}} something is in the disk drive
 
|addon=ComputerCraft
 
|addon=ComputerCraft
 
|desc=Checks whether any item at all is in the disk drive.
 
|desc=Checks whether any item at all is in the disk drive.

Latest revision as of 19:12, 22 April 2013


Grid Redstone.png  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

Grid paper.png  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