Difference between revisions of "Disk.isPresent"
From ComputerCraft Wiki
Scarfacial (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=disk.isPresent |args=string side |api=disk |returns=bool something is in the disk drive |addon=ComputerCraft |examples= {{Ex...") |
m (Use type template) |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=disk.isPresent | |name=disk.isPresent | ||
| − | |args= | + | |args={{Type|string}} side |
|api=disk | |api=disk | ||
| − | |returns= | + | |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. | ||
|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]] | ||
Latest revision as of 19:12, 22 April 2013
| 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
| 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 |