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

Help?

Started by Mokazomi, 03 January 2013 - 06:35 PM
Mokazomi #1
Posted 03 January 2013 - 07:35 PM
I have been playing with the "DNS" Techpack and computercraft is part of
it and i have a program for mining and it does not seem to work at all.I am
using a fuel source but my turtle will still not go forward.

Can you please help me?
Here is the program.




local a = 0
local b = 0

io.write("How long do you want you mineshaft to be?")
a = tonumber(read())

while b < a do
if turtle.detect() or turtle.detectDown() or turtle.detectUp() then
turtle.dig()
turtle.digUp()
turtle.digDown()

if turtle.detect() then
turtle.dig()
turtle.forward()
else
turtle.forward()
end
end
b = b + 1
end
ChiknNuggets #2
Posted 03 January 2013 - 07:46 PM
Hmm from what i see in the code there is nothing wrong with it, did you actually refuel the turtle? also go into lua and type turtle.forward() and see if that does anything, if not its probably ur fuel source
Mokazomi #3
Posted 03 January 2013 - 07:51 PM
yes i did refuel it but i dont think it takes the fuel
Lyqyd #4
Posted 03 January 2013 - 07:52 PM
You need to run the refuel program or call turtle.refuel() so that it actually uses the fuel.
ChiknNuggets #5
Posted 03 January 2013 - 07:52 PM
hmm try this code

local a = 0
local b = 0
io.write("How long do you want you mineshaft to be?")
a = tonumber(read())
while b < a do
if turtle.detect() or turtle.detectDown() or turtle.detectUp() then
  turtle.dig()
  turtle.digUp()
  turtle.digDown()

  if turtle.detect() then
   turtle.dig()
   turtle.forward()
  else
   turtle.forward()
  end
else
  turtle.forward()
end
b = b + 1
end

and what are you doing to refuel it?
Mokazomi #6
Posted 03 January 2013 - 07:59 PM
oh i did not know that you needed a refuel code. I thought it did that automatically.

thank you for you help.