Posted 17 December 2012 - 12:32 PM
Hello all, I just started getting into Lua programming with Turtles and have run into an error that I'm not sure about. This code is just for simple digging methods.
Error: bios:206: [string "dig"]:32: '=' expected
Code:
As far as I understand, it's saying that I need an '=' sign on the 32nd line, except that's the very last line of code.
Error: bios:206: [string "dig"]:32: '=' expected
Code:
direction=1
y=40
z=10
for w=1,z do
for x=1,y do
if direction==1 then
turtle.digUp()
turtle.up()
else
turtle.digDown()
turtle.down()
end
end
turtle.dig()
turtle.forward()
changedir()
end
if direction==1 then
for x=1, y do
turtle.down()
end
end
function changedir()
if direction==1 then
direction=0
else
direction=1
end
end
As far as I understand, it's saying that I need an '=' sign on the 32nd line, except that's the very last line of code.