This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CitricThunder's profile picture

For loop problem

Started by CitricThunder, 06 October 2012 - 05:45 PM
CitricThunder #1
Posted 06 October 2012 - 07: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.
jag #2
Posted 06 October 2012 - 07:53 PM
Well it should work…

EDIT: Yep! Just tried it, and it works!
CitricThunder #3
Posted 06 October 2012 - 07:58 PM
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
jag #4
Posted 06 October 2012 - 08:04 PM
Spoiler
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
Lol, yeah… Probably a bug