Guest User

This will not work please help.

a guest
Dec 29th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. function s3()
  2. turtle.select(3)
  3. turtle.compare()
  4. end
  5.  
  6. function sap()
  7. turtle.select(1)
  8. if turtle.compare() == true then
  9. turtle.select(2)
  10. turtle.place()
  11. elseif
  12. s3() == true then
  13. harvest()
  14. else
  15. turtle.dig()
  16. turtle.select(1)
  17. turtle.place()
  18. sap()
  19. end
  20. end
  21.  
  22. function logger()
  23. for i=1, 7 do
  24. turtle.up()
  25. end
  26. end
  27.  
  28. function harvest()
  29. turtle.dig()
  30. turtle.forward()
  31. logger()
  32. end
  33.  
  34. sap()
  35.  
  36.  
  37.  
  38. In my current slots of the turtle I have
  39.  
  40. S1 Sapling
  41.  
  42. S2 Bonemeal
  43.  
  44. S3 Birch Log
  45.  
  46. It's skipping over my else if and going straight to the else. So say it places the sapling and grows the tree perfect but when I want it to cut
  47. it down it just breaks the first log and places a sapling again and tries to grow it
  48. it's not checking my elseif to see that it's birchwood so it can start the cut down process.
  49. I'm sure this is more complicated than it should be but I'd like to understand why it's not working so I can fix these problems when I get more advanced
Advertisement
Add Comment
Please, Sign In to add comment