Unfortunately, I'm running into an error. I have no clue what's causing it. I'm a relative novice with LUA, so I was hoping for some help. Here's the error:
"bios:338: [string "mine"]:53: 'end' expected (to close 'function' at line 7)
function check() if (turtle.compare(1)==false) and (turtle.compare(2)==false) and (turtle.compare(3)==false) and (turtle.compare(4)==false) then do turtle.dig() end end function checkDown() if (turtle.compareDown(1)==false) and (turtle.compareDown(2)==false) and (turtle.compareDown(3)==false) and (turtle.compareDown(4)==false) then do turtle.digDown() end end function checkUp() if (turtle.compareUp(1)==false) and (turtle.compareUp(2)==false) and (turtle.compareUp(3)==false) and (turtle.compareUp(4)==false) then do turtle.digUp() end end function gravel() while (turtle.compare(1)==true) do turtle.dig() end end local i = 1 while i<=50 do turtle.dig() gravel() turtle.forward() checkUp() checkDown() turtle.turnLeft() check() turtle.turnRight() turtle.turnRight() check() turtle.turnLeft() i=i+1 end while i==51 do turtle.turnRight() turtle.turnRight() i=i+1 end while (i>=52) and (i<=101) do turtle.forward() i=i+1 end end
Edited by Lyqyd, 02 February 2013 - 11:08 AM.
added code tags











