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

I need help with automatic miner

Started by lukerules117, 26 September 2012 - 07:20 PM
lukerules117 #1
Posted 26 September 2012 - 09:20 PM
I'm writing a turtle program that I want to make a 1x2 mine shaft. I get,
while true do
turtle.refuel()
turtle.dig()
turtle.digup()
turtle.forward()
end
the error I get is mine:4: attempt to call nil
sjele #2
Posted 26 September 2012 - 09:26 PM
it's

turtle.digUp() 

while true do
sleep(0.1) --This is to prevent a stacking error
turtle.dig()
turtle.digUp()
turtle.forward()
end
Lettuce #3
Posted 26 September 2012 - 11:15 PM
He doesn't need sleep, if it hits end it discards the "brick." (I don't know what to call the program instance it makes.) I don't know why you want a cramped 2*1 tunnel that goes on ad infinitum, but at least you don't need to pause it. It can be 3*1 if you use turtle.digUp() and turtle.digDown(), which is probably better resource-wise, and it uses the same amount of fuel.

Always remember: ComputerCraft uses camelCase. everyTimeYouStartANewWordCapitaliseTheFirstLetterExceptTheFirstWord.
Cranium #4
Posted 26 September 2012 - 11:19 PM
Always remember: ComputerCraft uses camelCase. everyTimeYouStartANewWordCapitaliseTheFirstLetterExceptTheFirstWord.
Ha…established, recognized, and accepted formatting… I LAUGH IN YOUR LOGICAL FACE!!!! :P/>/>
I rarely EVER do that when creating new functions. But it is required for existing functions, Lukerules117.
lukerules117 #5
Posted 05 October 2012 - 11:15 PM
Thanks and the reason I want a 2*1 tunnel is because I'm mining at the 12th layer.