Jump to content




MineTurtle Code



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

#1 mineturtle2

  • New Members
  • 1 posts

Posted 07 December 2016 - 12:02 AM

I want to add code to make the turtle return at the end.
http://pastebin.com/5ZfcRLkf
Thank you!

Edited by mineturtle2, 07 December 2016 - 02:25 PM.


#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 07 December 2016 - 02:59 AM

If you fix your indentation, the problem becomes quite obvious:

length=10
for i=1, length, 1 do --#this loop doesn't have a specified end!
  while turtle.detect() do
    turtle.dig()
    sleep(1)
  end

  while turtle.detectUp() do
    turtle.digUp()
    sleep(1)
  end

  if turtle.dectectDown()
    turtle.digDown()
  end
--# You should add one here!


#3 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 07 December 2016 - 04:54 AM

You're also missing a then for your if statement...
if turtle.dectectDown() then --# you're missing a then right here
  turtle.digDown()
end






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users