its probably something really obvious but i just cant see it.
so here is the code
function refuel() turtle.select(1) turtle.refuel(1) end function digUp() while turtle.detectUp() do turtle.digUp() end end function moveUp() if turtle.getFuelLevel() < 10 then refuel() end while turtle.up == false do digUp() turtle.attackUp() end end function digForward() while turtle.detect() do turtle.dig() end end function moveForward() if turtle.getFuelLevel() < 10 then refuel() end while turtle.forward() == false do digForward() turtle.attack() end end function turnAround() turtle.turnRight(2) end function mineLayer() moveForward() sleep(.5) turtle.turnRight() moveForward(2) turnAround() moveUp() moveForward(2) turnAround() moveUp() moveForward(2) turnAround() turtle.down(2) moveForward(2) turtle.turnRight() end while true do mineLayer() end
thank you for any input, this is my first attempt at a program so constructive criticism is welcomed