Posted 26 September 2012 - 01:06 AM
I'm writing a turtle program which I hope would go out and mine 50 blocks, turn around, come back the same distance, then drop its inventory and move the right turn and repeat. I will have a line of obsidian pipes to recieve the drops. I get,
the error i'm getting is :15: '<name>' expected
the main thing i'm unsure about is how to do the loops, i.e, the ones with for and the ones which are turning it around.
while true do
local amountOfTimes = 50
for 1,amountOfTimes do
turtle.dig()
turtle.forward()
turtle.digUp()
end
turtle.turnRight()
turtle.turnRight()
end
local amount2 = 50
for 1,amount2 do
turtle.forward()
end
for i = 1,16
turtle.select(i)
turtle.drop
end
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
end
end
the error i'm getting is :15: '<name>' expected
the main thing i'm unsure about is how to do the loops, i.e, the ones with for and the ones which are turning it around.