Here is my function...
function clearing() for j=1, wide do clearlong() if j~= then wturn() end end end
When I test it with just numbers it seems to be working fine, however, when using my functions it just won't work. I'm just learning and trying out this coding I'm sorry if this is a simple question so any help would be very helpful, thanks.
wturn
function wturn()
if direction==1 then
turtle.turnRight()
if turtle.detect() then
turtle.dig()
digcount=digcount+1
term.clearLine()
term.setCursorPos(1,1)
write("Current Dig Count Is: "..digcount)
end
turtle.forward()
turtle.turnRight()
direction=direction+1
elseif direction==2 then
turtle.turnLeft()
if turtle.detect() then
turtle.dig()
digcount=digcount+1
term.clearLine()
term.setCursorPos(1,1)
write("Current Dig Count Is: "..digcount)
end
turtle.forward()
turtle.turnLeft()
direction=direction-1
end
end
clearlong
function clearlong()
for i=1,long do
if turtle.detect() then
turtle.dig()
digcount=digcount+1
term.clearLine()
term.setCursorPos(1,1)
write("Current Dig Count Is: "..digcount)
end
turtle.forward()
end
end












