Posted 13 October 2012 - 05:21 PM
Hi guys,
Im trying to make a little program wich caves out a stairway into the ground, and to deal with the unlikely case of sand/gravel dropping on the turtle i made a repeat loop to break the sand/gravel but when i start the skript it gives me a eof error on line 32
("bios:206: [string "tunnel"]:32: 'eof' expected")
No matter what i do i cant get it to work properly,
My computercraft version is 1.4 with ccSensors installed.
I would really appreciate if someone can give me the solutuion to this little but really annoying problem.
The code:
Im trying to make a little program wich caves out a stairway into the ground, and to deal with the unlikely case of sand/gravel dropping on the turtle i made a repeat loop to break the sand/gravel but when i start the skript it gives me a eof error on line 32
("bios:206: [string "tunnel"]:32: 'eof' expected")
No matter what i do i cant get it to work properly,
My computercraft version is 1.4 with ccSensors installed.
I would really appreciate if someone can give me the solutuion to this little but really annoying problem.
The code:
Spoiler
local max=0
function iniPosDig()
while true do
if not turtle.detectDown() then
turtle.down()
else
return false
end
end
end
function moveDown()
max=0
turtle.forward()
turtle.digDown()
turtle.down()
turtle.dig()
while not turtle.forward() do
turtle.dig()
turtle.dig()
turtle.dig()
turtle.dig()
end
turtle.forward()
turtle.digUp()
repeat
turtle.digUp()
until
turtle.detectUp()==false
end
end
end
function turtleFull()
if turtle.getItemCount(15) > 1 then
return true
end
end
term.clear()
term.setCursorPos(1,1)
print("How deep down should this tunnel go?")
local IN = read()
for i=1,IN do
if i == 1 then
iniPosDig()
end
moveDown()
end