turtle.getItemCount
Get the number of items in a slot. It will use the current selected slot, if slot is not specified.
  | 
  |||
| Get the item count of the currently selected slot and print it. | |||
| Code | <nowiki>
print(turtle.getItemCount())
  </nowiki>
 | 
    ||
| Output | 5
 | 
    ||
Functions  | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| turtle.getItemCount Function  | |
|---|---|
| 
Syntax turtle.getItemCount( 
  | |
| Returns | number count | 
| API | turtle | 
| 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.