I'm working on a turtle program to dig up blocks because I need a lot of them and it's annoying to mine it
local tArgs = { ... }
if #tArgs < 3 then
error("Usage: quarry <x> <y> <z>")
end
local width = tonumber(tArgs[1])
local height = tonumber(tArgs[2])
local depth = tonumber(tArgs[3])
if turtle.getFuelLevel() < 100 then
turtle.refuel()
end
for 0, height do
turtle.digDown()
turtle.down()
for 0, depth do
for 0, width do
if turtle.getFuelLevel() < 100 then
turtle.refuel()
end
turtle.dig()
turtle.forward()
end
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnRight()
end
end
Blowing the blocks up with TNT will work for now
for 0, height do
is not valid lua, you need a variable to store the values between 0 and height in. You'll have the same issue with your depth and width loops
try for h = 0, height do