Posted 16 December 2012 - 02:57 PM
i have written my own lumberjack code.
yes, i know there are plenty out there that work
but i just wanted to write my own
practice my turtle skills
the error is
and the code is
slot 1 is where i put my fuel
and slot 2 is where i put my sample logs
yes, i know there are plenty out there that work
but i just wanted to write my own
practice my turtle skills
the error is
bios:338: [string "tree"]:14: '<eof>' expected
and the code is
local function checkFuel()
if turtle.getFuelLevel() < 1 then
turtle.select(1)
turtle.refuel(1)
turtle.select(2)
end
end
local function lumber()
if turtle.digUp() then
checkFuel()
turtle.up()
end
end
local height = 0
turtle.select(2)
turtle.dig()
turtle.forward()
while turtle.compareUp() do
lumber()
height = height+1
end
while height > 0 do
checkFuel()
turtle.down()
height = height-1
end
turtle.back()
slot 1 is where i put my fuel
and slot 2 is where i put my sample logs