This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
AtFEngineer's profile picture

tree:8: Expected number

Started by AtFEngineer, 09 September 2013 - 05:55 PM
AtFEngineer #1
Posted 09 September 2013 - 07:55 PM
I made a program that would automatically cut down trees and such (pastebin.com/jf9YpLNH) and it gives me this error code tree:8: Expected number (I named it tree). I am not sure what this means. I tried looking through the common errors section but I couldn't find the error I got. Any help is appreciated.
Lyqyd #2
Posted 09 September 2013 - 08:03 PM
Split into new topic.

Thanks for trying to use the resources available to you before posting a question! The problem in your code is that turtle.getItemCount requires a slot number (1-16) as an argument, and you didn't provide one.
AtFEngineer #3
Posted 09 September 2013 - 08:16 PM
Thank you so much! I am new to programming and I got so bummed when it didn't work.
Imred Gemu #4
Posted 09 September 2013 - 08:43 PM
As Lyqyd said, turtle.getItemCount(Number) requires a number as an argument. This number must be between or equal to the values of 1 through 16 and corresponds with the 16 slots in the turtles inventory starting in the upper left slot and going left to right.