Posted 11 April 2012 - 12:53 PM
Here is the code -
and I'm having trouble with objectfinder() because what I want it to do is "popapi.lumberjack()" whenever it detects a block when the function is running, but it just looks at the block, and keeps on going…
I've been trying to figure this out for 2 days ._.
Oh yeah- it actually is function objectfinder() not just function objectfinder :P/>/> I'm not that stupid/new.
Still, not working….
function lumberjack()
x = 0
while turtle.detect() do
turtle.dig()
turtle.up()
turtle.digUp()
x = x+1
end
while turtle.detectDown() == false do
turtle.down()
end
print ("The tree was "..x.." in height of blocks.")
end
function objectfinder
if turtle.detect() then
popapi.lumberjack()
end
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.fordward()
os.sleep(0.1)
turtle.back()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnRight()
turtle.forward()
os.sleep(0.1)
end
and I'm having trouble with objectfinder() because what I want it to do is "popapi.lumberjack()" whenever it detects a block when the function is running, but it just looks at the block, and keeps on going…
I've been trying to figure this out for 2 days ._.
Oh yeah- it actually is function objectfinder() not just function objectfinder :P/>/> I'm not that stupid/new.
Still, not working….