Posted 13 December 2012 - 03:52 AM
local function checkFuel()
if turtle.getFuelLevel() < 1 then
turtle.select(1)
turtle.refuel(1)
end
end
local function column()
while turtle.digUp() do
turtle.dig()
checkFuel()
turtle.up()
end
turtle.dig()
checkFuel()
while turtle.down() do
checkFuel()
end
end
local function digmove()
checkFuel()
turtle.dig()
turtle.forward()
end
digmove()
column()
turtle.turnRight()
digmove()
turtle.turnLeft()
column()
turtle.turnLeft()
digmove()
digmove()
turtle.turnRight()
column()
when i start this program i get the following error : fell :2: attempt to call nil
can somebody help me ?
if turtle.getFuelLevel() < 1 then
turtle.select(1)
turtle.refuel(1)
end
end
local function column()
while turtle.digUp() do
turtle.dig()
checkFuel()
turtle.up()
end
turtle.dig()
checkFuel()
while turtle.down() do
checkFuel()
end
end
local function digmove()
checkFuel()
turtle.dig()
turtle.forward()
end
digmove()
column()
turtle.turnRight()
digmove()
turtle.turnLeft()
column()
turtle.turnLeft()
digmove()
digmove()
turtle.turnRight()
column()
when i start this program i get the following error : fell :2: attempt to call nil
can somebody help me ?