This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
donnie4862's profile picture

program problem

Started by donnie4862, 13 December 2012 - 02:52 AM
donnie4862 #1
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 ?
Ulthean #2
Posted 13 December 2012 - 04:02 AM
Works fine when I run it.

A possibility could be that you don't have the right version of CC, since turtle.getFuelLevel() was only added in CC 1.4
PixelToast #3
Posted 13 December 2012 - 04:08 AM
this belongs in the "ask a pro" section

you are using an outdated computercraft
redpower *cough* *cough*

you dont need to fuel your turtle