Posted 08 July 2012 - 06:42 AM
I'm not sure if it works but I making my first program.
Once done, the turtle will dig 1x16 tunnel with tnt 5 blocks apart.
How to use: Place down your turtle on the side of a wall you want to hollow into a room (the tunnel will be 1 block behind the turtle and 1 block up from that.
Here's the code:
textutils.slowWrite( "OK, I will start to dig and place tnt." )
turtle.up()
wait (0.2)
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turnRight(2)
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turnRight(2)
tryPlace(1)
turnRight(2)
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turnRight(2)
tryPlace(1)
turnRight(2)
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turnRight(2)
tryPlace(1)
turtle.down()
textutils.slowWrite( "Job Done! ")
end
I am getting an error that says this when I run the program:
bios:206: string "tnt"]:66:
'<eof>' expected
Why do I get this error?
Once done, the turtle will dig 1x16 tunnel with tnt 5 blocks apart.
How to use: Place down your turtle on the side of a wall you want to hollow into a room (the tunnel will be 1 block behind the turtle and 1 block up from that.
Here's the code:
textutils.slowWrite( "OK, I will start to dig and place tnt." )
turtle.up()
wait (0.2)
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turtle.forward()
tryDig()
turnRight(2)
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turnRight(2)
tryPlace(1)
turnRight(2)
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turnRight(2)
tryPlace(1)
turnRight(2)
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turnRight(2)
tryPlace(1)
turtle.down()
textutils.slowWrite( "Job Done! ")
end
I am getting an error that says this when I run the program:
bios:206: string "tnt"]:66:
'<eof>' expected
Why do I get this error?