Posted 08 December 2012 - 01:27 PM
So, I've written a basic program that uses the built in "tunnel" command, yet I keep getting errors and cannot for the life of me figure them out, since I am very new to coding. Would anyone please be kind enough to review my code?
Currently it's telling me it's expecting a 'then' at line 3.
for i = 1,16 do
shell.run("tunnel", "64")
if i = 1, 3, 5, 7, 9, 11, 13, 15 then
turtle.turnRight()
for o = 1,3
turtle.dig()
turtle.forward()
end
turtle.turnRight()
if i % 2 then
turtle.turlLeft()
for o = 1,3
turtle.dig()
turtle.forward()
end
turtle.turnLefT()
end
turtle.turnRight()
for i = 1, 45 do
turtle.dig()
turtle.forward()
end
Currently it's telling me it's expecting a 'then' at line 3.