Jump to content




Turtle min down to specified height

turtle lua

2 replies to this topic

#1 f4ls3

  • New Members
  • 1 posts

Posted 08 December 2020 - 07:35 PM

Hello everybody,
so Im having an issue that my turtle keeps moving down and doesn't stop at all at any point.
This is my code
function mine ()
	done = false
  
	while not done do
		print("Moving to desired starting height...")
		while not (TURTLE_POSITION.y == heightToStart) do
			turtle.digDown()
			turtle.down()
		end
		print("Starting height reached. Filtering Items...")
		filterItems()
		print("Filtered Items. Starting to mine cuboid...")
		done = true
	end
end

It doesn't even get to the end because it gets stuck at the diging down part

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,464 posts

Posted 12 December 2020 - 04:07 AM

Moved to Ask a Pro.

#3 Luca_S

  • Members
  • 407 posts
  • LocationGermany

Posted 12 December 2020 - 07:53 AM

Can you post your whole code please? Without that I'd guess that TURTLE_POSITION.y isn't updated which means the loop runs forever.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users