Posted 18 February 2013 - 10:23 PM
Title: Need Help With Error in Strip Mining Code
I made this code to use on multiple turtles to stripmine a large area but i keep getting the same error no matter what i do. I made a simplier code with the some idea of using a function and a for loop to work but i cant seem to get this to work. HELP.
the error is bios:338: [string "mine"]:7: '(' expected
and the code is this
local a = 0
write("Distance")
input = read()
a = input
function mine
turtle.dig()
turtle.up()
turtle.dig()
turtle.up()
turtle.dig()
turtle,forward()
turtle.down(2)
end
for i = 1, a do
mine
end
turtle.back(a)
Thank You
I made this code to use on multiple turtles to stripmine a large area but i keep getting the same error no matter what i do. I made a simplier code with the some idea of using a function and a for loop to work but i cant seem to get this to work. HELP.
the error is bios:338: [string "mine"]:7: '(' expected
and the code is this
local a = 0
write("Distance")
input = read()
a = input
function mine
turtle.dig()
turtle.up()
turtle.dig()
turtle.up()
turtle.dig()
turtle,forward()
turtle.down(2)
end
for i = 1, a do
mine
end
turtle.back(a)
Thank You