Posted 05 March 2012 - 06:06 AM
I'm new to Lua (coding in general, actually), so please excuse me if there's a really obvious solution to this.
Now, I've written a program on my turtle that as far as I know should dig me a custom bunker area. Code is below (It's not very readble right now, I'm sorry about that. I usually don't pretty it up untill I know it works):
However, when I try to run the program it errors, giving me:
The only thing on Line28 is below, so I'm not sure why it's expecting an '='
Any help would be appreciated.
Now, I've written a program on my turtle that as far as I know should dig me a custom bunker area. Code is below (It's not very readble right now, I'm sorry about that. I usually don't pretty it up untill I know it works):
x = 0
while true do
turtle.down(1)
turtle.digDown()
x = x+1
if x == 8 then
break
end
end
x = 0
while true do
turtle.dig()
turtle.up(1)
turtle.dig()
turtle.forward(1)
turtle.down(1)
x = x+1
if x == 3 then
break
end
end
turtle.turnLeft(1)
x = 0
while true do
turtle.dig()
turtle.up(1)
turtle.dig
turtle.forward(1)
turtle.down()
x = x+1
if x == 3 then
break
end
end
x = 0
turtle.turnRight(2)
turtle.forward(3)
while true do
turtle.dig()
turtle.up(1)
turtle.dig()
turtle.down(1)
turtle.forward(1)
x = x+1
if x == 3 then
break
end
end
y = 0
while true do
turtle.turnLeft(1)
turtle.dig()
turtle.up(1)
turtle.dig()
turtle.forward(1)
turtle.turnLeft(1)
turtle.down(1)
x = 0
while true do
turtle.dig()
turtle.up(1)
turtle.dig()
turtle.forward(1)
turtle.down(1)
x = x+1
if x == 6 then
break
end
end
turtle.turnRight(1)
turtle.dig()
turtle.up(1)
turtle.dig()
turtle.forward(1)
turtle.turnRight(1)
turtle.down(1)
x = 0
while true do
turtle.dig()
turtle.up(1)
turtle.dig()
turtle.forward(1)
turtle.down(1)
x = x+1
if x == 6 then
break
end
end
y = y+1
if y == 4 then
break
end
end
However, when I try to run the program it errors, giving me:
bios:206: [string "bunkertest"]:28: '=' expected
The only thing on Line28 is below, so I'm not sure why it's expecting an '='
turtle.forward(1)
Any help would be appreciated.