Posted 11 January 2013 - 08:36 AM
this is a simple program that cuts down the trunk of the 3x3 rubber tree from red power. it gets 2 digs in then gives me this
3x3:18: attempt to index ? (a nil value)
3x3:18: attempt to index ? (a nil value)
x = 0
h = 0
function fuel()
if turtle.getFuelLevel() < 10 then
turtle.select(16)
turtle.refuel(1)
turtle.select(1)
end
end
function lane()
fuel()
turtle.turnLeft()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turrtle.dig()
turtle.turnLeft()
end
function layer()
lane()
turtle.dig()
turtle.forward()
lane()
turtle.dig()
turtle.forward()
lane()
turtle.back()
turtle.back()
end
fuel()
turtle.dig()
turtle.forward()
turtle.select(15)
while turtle.compareUp() do
layer()
fuel()
turtle.digUp()
turtle.up()
h = h + 1
end
for x = 1, h do
turtle.down()
end