Difference between revisions of "Turtle.getItemCount"
From ComputerCraft Wiki
(Undo revision 1831 by 37.59.80.67 (talk)) |
(Added slot arg) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=turtle.getItemCount | |name=turtle.getItemCount | ||
− | |args= | + | |args=slot |
|api=turtle | |api=turtle | ||
|returns=[[integer]] the number of items found in the specified slot. | |returns=[[integer]] the number of items found in the specified slot. | ||
Line 10: | Line 10: | ||
{{Example | {{Example | ||
|desc=Prints the number of items in the specified slot. | |desc=Prints the number of items in the specified slot. | ||
− | |code=print(turtle.getItemCount()) | + | |code=print(turtle.getItemCount(slot)) |
|output=Integer 0 through 64 depending on number of items. | |output=Integer 0 through 64 depending on number of items. | ||
}} | }} | ||
}} | }} |
Revision as of 20:33, 17 August 2012
Function turtle.getItemCount | |
Prints the number of items in the specified slot. | |
Syntax | turtle.getItemCount(slot) |
Returns | integer the number of items found in the specified slot. |
Part of | ComputerCraft |
API | turtle |
Examples
Example | |
Prints the number of items in the specified slot. | |
Code |
print(turtle.getItemCount(slot)) |
Output | Integer 0 through 64 depending on number of items. |