Posted 29 August 2012 - 04:57 AM
I was wondering if anyone could help me with this, I have been trying to make a turtle that would dig a 3x3 tunnel for me, I know that there is already the tunnel command that comes with it but that is 2x3 and doesn't really look that well with my house. So I have got the program to run up to a certain part, so after I put in how far I want it sleeps then tells me how far it is going to mine after you put in the desired length then it comes up with an error.
The Error: mine:10: attempt to compare string with number expected, got string
Any help would be appreciated, thanks :)/>/>
term.clear()
term.setCursorPos(1, 1)
print "Length: ?"
term.setCursorPos(1, 2)
x = read()
sleep(1)
term.clear()
term.setCursorPos(1, 1)
write(" Mining "..x.." blocks far ")
if x > 0 then
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.up()
turtle.digUp()
turtle.turnLeft()
turtle.turnLeft()
turtle.dig()
turtle.up()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.down()
turtle.down()
turtle.turnLeft()
x = x-1
else
end
The Error: mine:10: attempt to compare string with number expected, got string
Any help would be appreciated, thanks :)/>/>