Jump to content




For loop problem


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

#1 CitricThunder

  • Members
  • 33 posts

Posted 06 October 2012 - 06:45 PM

I have a function that asks for a number which will go into the second number in a for loop.
function mineStone(count) -- Asks for a count
  for i = 1, count do -- The count is how many times it will loop
	turtle.digDown() -- It should dig down 15 blocks
	turtle.down()
  end

  for e = 1, count do
	turtle.up() -- It should go back up 15 blocks
  end
end

mineStone(15)

It is only going down 7 blocks and won't go back up. Am I doing something wrong? I checked to make sure there was enough fuel and there was. Im stumped.

#2 jag

  • Members
  • 533 posts
  • LocationStockholm, Sweden

Posted 06 October 2012 - 06:53 PM

Well it should work...

EDIT: Yep! Just tried it, and it works!

#3 CitricThunder

  • Members
  • 33 posts

Posted 06 October 2012 - 06:58 PM

View Postjag_e_nummer_ett, on 06 October 2012 - 06:53 PM, said:

Well it should work...

EDIT: Yep! Just tried it, and it works!

Yeah I restarted my client and it worked. I don't know why it wasn't working before :D/>. Weird

#4 jag

  • Members
  • 533 posts
  • LocationStockholm, Sweden

Posted 06 October 2012 - 07:04 PM

View Postcaptainprice12, on 06 October 2012 - 06:58 PM, said:

Spoiler
Lol, yeah... Probably a bug





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users