This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
konzendude's profile picture

Tree Mining Program

Started by konzendude, 20 December 2013 - 10:51 PM
konzendude #1
Posted 20 December 2013 - 11:51 PM
Hey guys! I'm a brand new user of ComputerCraft and I need some help. I created a program to mine tree's but it doesn't seem to be working. I'll put a link to a video I made of the program and a copy of the program itself. Thanks so much for your help!

Here is the video link: http://www.youtube.com/watch?v=xZ9IcgkAbps

And the code:
while not turtle.detectUp() do
turtle.dig()
turtle.up()
end

while turtle.detectUp() do
turtle.digUp()
turtle.up()
end

while not turtle.compareTo(1) do
turtle.down()
end

while turtle.compareTO(1) do
turtle.dig()
turtle.down()
end


Thanks for all your help!!
aaa #2
Posted 30 December 2013 - 08:01 PM
turtle.compareTo(slot) between the item in the current slot and the item in the specified slot. You may want use turtle.compare() instead. (http://computercraft...urtle_%28API%29)
Edited on 30 December 2013 - 07:01 PM