Posted 02 January 2013 - 11:36 AM
Ok, so the Error I'm getting is with the code below. (I'm running tekkit 1.2.5, not CC 1.4.6) When i try to run the program, i get the error "Tunnel :5: 'for' limit must be a number". I'm not sure why I'm getting this error, does anyone know?
print("How far?")
dist = tonumber read()
n = 1
for i = 1, dist do
while turtle.detect() do
turtle.dig()
sleep(0.25)
end
turtle.forward()
turtle.digUp()
n = n + 1
if not turtle.detectDown() then
turtle.select(2)
turtle.placeDown()
end
if n == 7 then
turtle.turnLeft()
turtle.dig()
turtle.select(1)
turtle.place()
turtle.turnRight()
n = 1
end
end
print("How far?")
dist = tonumber read()
n = 1
for i = 1, dist do
while turtle.detect() do
turtle.dig()
sleep(0.25)
end
turtle.forward()
turtle.digUp()
n = n + 1
if not turtle.detectDown() then
turtle.select(2)
turtle.placeDown()
end
if n == 7 then
turtle.turnLeft()
turtle.dig()
turtle.select(1)
turtle.place()
turtle.turnRight()
n = 1
end
end