Posted 17 May 2013 - 04:21 AM
Hi guys, can u guys find any mistakes? when i run the program "Wood.txt" this shows up:
wood.txt:2: attempt to compare __lt on function and number
Here's the code:
function fixaFuel()
if turtle.getFuelLevel < 100 then
turtle.select(16)
turtle.refuel(1)
end
function fixaBoneMeal()
if turtle.getItemCount(2) == 0 then
print "Fixa mer BoneMeal!"
end
function plantera()
turtle.forward()
turtle.forward()
turtle.select(1)
turtle.place()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.place()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
turtle.turnRight()
turtle.place()
turtle.turnRight()
turtle.forward()
for slot=3,10 do
turtle.select(slot)
turtle.drop()
end
turtle.turnLeft()
turtle.turnLeft()
turtle.select(1)
turtle.place()
turtle.select(2)
turtle.place()
end
end
end
fixaFuel()
fixaBoneMeal()
plantera()
wood.txt:2: attempt to compare __lt on function and number
Here's the code:
function fixaFuel()
if turtle.getFuelLevel < 100 then
turtle.select(16)
turtle.refuel(1)
end
function fixaBoneMeal()
if turtle.getItemCount(2) == 0 then
print "Fixa mer BoneMeal!"
end
function plantera()
turtle.forward()
turtle.forward()
turtle.select(1)
turtle.place()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.place()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
turtle.turnRight()
turtle.place()
turtle.turnRight()
turtle.forward()
for slot=3,10 do
turtle.select(slot)
turtle.drop()
end
turtle.turnLeft()
turtle.turnLeft()
turtle.select(1)
turtle.place()
turtle.select(2)
turtle.place()
end
end
end
fixaFuel()
fixaBoneMeal()
plantera()