Posted 27 November 2013 - 04:56 PM
Hello everyone. I've recently taken an interest in creating mining programs for turtles instead of just downloading them. I realize this could probably be done much better but this is my first program and feel pretty rewarded having made it. However, there seems to be a problem with it somewhere. The turtle is giving me this error code: [string "StripMiner"]:94: '=' expected
I checked line 94 and there is, in fact, an equals sign. I've checked all over and cannot seem to find a problem so I was hoping someone else could give it a shot.
Here: http://pastebin.com/C5qZwWPD is the pastebin link and also in a spoiler:
– Repeats X. X does 5 tunnels
for c=1,5 do
for a=1,50 do
turtle.dig()
turtle.forward()
turtle.digUp()
end
for b=1,50 do
turtle.back()
end
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft()
end
– The above line and up (Other than the top line) is X
– "cancels out" last part of X to get back into tunnel
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
– Goes back to the beginning of the last tunnel
for d=1,50 do
turtle.forward()
end
– Goes to original point
turtle.turnRight()
for e=1,8 do
turtle.forward()
end
– Dumps everything out of the turtle
turtle.turnLeft()
turtle.select(1)
turtle.drop(64)
turtle.select(2)
turtle.drop(64)
turtle.select(3)
turtle.drop(64)
turtle.select(4)
turtle.drop(64)
turtle.select(5)
turtle.drop(64)
turtle.select(6)
turtle.drop(64)
turtle.select(7)
turtle.drop(64)
turtle.select(8)
turtle.drop(64)
turtle.select(9)
turtle.drop(64)
turtle.select(10)
turtle.drop(64)
turtle.select(11)
turtle.drop(64)
turtle.select(12)
turtle.drop(64)
turtle.select(13)
turtle.drop(64)
turtle.select(14)
turtle.drop(64)
turtle.select(15)
turtle.drop(64)
turtle.select(16)
turtle.drop(64)
– Continues on to mine 5 more tunnels
turtle.turnLeft()
for f=1,8 do
turtle.forward()
end
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft
– Same thing as X, just doing 5 more tunnels
for z=1,5 do
for h=1,50 do
turtle.dig()
turtle.forward()
turtle.digUp()
end
for i=1,50 do
turtle.back()
end
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft()
end
– Same deal again, "cancelling out" the last part of X to get back into the tunnel
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
– Goes to back to the beginning of the tunnel again
for j=1,50 do
turtle.forward()
end
– Goes to the inital point
turtle.turnRight()
for k=1,18 do
turtle.forward()
end
– Dumps everything out of the turtle
turtle.turnLeft()
turtle.select(1)
turtle.drop(64)
turtle.select(2)
turtle.drop(64)
turtle.select(3)
turtle.drop(64)
turtle.select(4)
turtle.drop(64)
turtle.select(5)
turtle.drop(64)
turtle.select(6)
turtle.drop(64)
turtle.select(7)
turtle.drop(64)
turtle.select(8)
turtle.drop(64)
turtle.select(9)
turtle.drop(64)
turtle.select(10)
turtle.drop(64)
turtle.select(11)
turtle.drop(64)
turtle.select(12)
turtle.drop(64)
turtle.select(13)
turtle.drop(64)
turtle.select(14)
turtle.drop(64)
turtle.select(15)
turtle.drop(64)
turtle.select(16)
turtle.drop(64)
– faces the original position
turtle.turnRight()
turtle.turnRight()
I checked line 94 and there is, in fact, an equals sign. I've checked all over and cannot seem to find a problem so I was hoping someone else could give it a shot.
Here: http://pastebin.com/C5qZwWPD is the pastebin link and also in a spoiler:
Spoiler
for c=1,5 do
for a=1,50 do
turtle.dig()
turtle.forward()
turtle.digUp()
end
for b=1,50 do
turtle.back()
end
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft()
end
– The above line and up (Other than the top line) is X
– "cancels out" last part of X to get back into tunnel
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
– Goes back to the beginning of the last tunnel
for d=1,50 do
turtle.forward()
end
– Goes to original point
turtle.turnRight()
for e=1,8 do
turtle.forward()
end
– Dumps everything out of the turtle
turtle.turnLeft()
turtle.select(1)
turtle.drop(64)
turtle.select(2)
turtle.drop(64)
turtle.select(3)
turtle.drop(64)
turtle.select(4)
turtle.drop(64)
turtle.select(5)
turtle.drop(64)
turtle.select(6)
turtle.drop(64)
turtle.select(7)
turtle.drop(64)
turtle.select(8)
turtle.drop(64)
turtle.select(9)
turtle.drop(64)
turtle.select(10)
turtle.drop(64)
turtle.select(11)
turtle.drop(64)
turtle.select(12)
turtle.drop(64)
turtle.select(13)
turtle.drop(64)
turtle.select(14)
turtle.drop(64)
turtle.select(15)
turtle.drop(64)
turtle.select(16)
turtle.drop(64)
– Continues on to mine 5 more tunnels
turtle.turnLeft()
for f=1,8 do
turtle.forward()
end
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft
– Same thing as X, just doing 5 more tunnels
for z=1,5 do
for h=1,50 do
turtle.dig()
turtle.forward()
turtle.digUp()
end
for i=1,50 do
turtle.back()
end
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft()
end
– Same deal again, "cancelling out" the last part of X to get back into the tunnel
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
– Goes to back to the beginning of the tunnel again
for j=1,50 do
turtle.forward()
end
– Goes to the inital point
turtle.turnRight()
for k=1,18 do
turtle.forward()
end
– Dumps everything out of the turtle
turtle.turnLeft()
turtle.select(1)
turtle.drop(64)
turtle.select(2)
turtle.drop(64)
turtle.select(3)
turtle.drop(64)
turtle.select(4)
turtle.drop(64)
turtle.select(5)
turtle.drop(64)
turtle.select(6)
turtle.drop(64)
turtle.select(7)
turtle.drop(64)
turtle.select(8)
turtle.drop(64)
turtle.select(9)
turtle.drop(64)
turtle.select(10)
turtle.drop(64)
turtle.select(11)
turtle.drop(64)
turtle.select(12)
turtle.drop(64)
turtle.select(13)
turtle.drop(64)
turtle.select(14)
turtle.drop(64)
turtle.select(15)
turtle.drop(64)
turtle.select(16)
turtle.drop(64)
– faces the original position
turtle.turnRight()
turtle.turnRight()