Jump to content




tree:8: Expected number


  • You cannot reply to this topic
3 replies to this topic

#1 AtFEngineer

  • New Members
  • 2 posts

Posted 09 September 2013 - 06: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.

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 09 September 2013 - 07: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.

#3 AtFEngineer

  • New Members
  • 2 posts

Posted 09 September 2013 - 07:16 PM

Thank you so much! I am new to programming and I got so bummed when it didn't work.

#4 Imred Gemu

  • Members
  • 47 posts

Posted 09 September 2013 - 07: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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users