Posted 29 December 2012 - 04:19 AM
Hi!
I'm French and I use a program to recover wood with turtles
and I get this error "attempt to compare number with string expected got number"
it is not me who made this program.
Here is the original link: http://pastebin.com/K3GnDV3w
Thank you in advance for your help.
I'm French and I use a program to recover wood with turtles
and I get this error "attempt to compare number with string expected got number"
function detecteMarqueSol()
marque = -1
for i = 9, 12 do
turtle.select(i)
if(turtle.compareDown()) then
marque = i
end
end
return marque
end
-- Démarrage...
i = 1
turtle.select(16)
while i <= 4 do
if turtle.compare() then
turtle.turnLeft()
i = 5
else
turtle.turnRight()
i = i + 1
end
end
while true do
marque = detecteMarqueSol()
if(marque > 0) then
if marque == 12 then
if turtle.detect() then
turtle.turnRight()
end
elseif marque == 11 then
turtle.turnLeft()
if not turtle.detect() then
turtle.select(1)
turtle.place()
end
turtle.turnRight()
elseif marque == 10 then
if turtle.getFuelLevel() < 96 then
turtle.turnLeft()
turtle.select(5)
turtle.suck()
if turtle.getItemCount(5) > 2 then
turtle.drop(turtle.getItemCount(5) - 2)
end
turtle.refuel(1)
turtle.turnRight()
end
elseif marque == 9 then
turtle.select(1)
if turtle.getItemCount(1) < 13 then
turtle.turnLeft()
turtle.suck()
if turtle.getItemCount(1) > 13 then
turtle.drop(turtle.getItemCount(1) - 13)
end
turtle.turnRight()
end
end
end
turtle.forward()
end
it is not me who made this program.
Here is the original link: http://pastebin.com/K3GnDV3w
Thank you in advance for your help.