This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Tekkers123's profile picture

Bios:14: error

Started by Tekkers123, 20 July 2015 - 05:02 PM
Tekkers123 #1
Posted 20 July 2015 - 07:02 PM
I keep getting an error that says this "bios:14: [string ".temp."]:67: syntax error". I am pretty new at this and I definitely did not just write this long code to get an error. This code is for a turtle that mines coal blocks underneath it unlimitedly (for galacticraft purposes).

Here Is the code……

turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.turnLeft(1)
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
os.sleep(2)
turtle.turnLeft(1)
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.turnLeft(1)
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
os.sleep(2)
turtle.digDown()
turtle.turnLeft(1)
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.turnLeft(1)
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.turnLeft(1)
turtle.forward(1)
turtle.digDown()
turtle.forward(1)
turtle.digDown()
turtle.turnLeft(1)
turtle.forward(1)
turtle.turnRight(1)
turtle.forward(1)
turtle.turnLeft(1)
turtle.forward(2)
turtle.turnRight(1)
turtle,forward(1)
turtle.turnRight(1)
turtle.turnRight(1)
os.sleep(2)
turtle.select(1)
turtle.drop()
turtle.select(2)
turtle.drop()
turtle.select(3)
turtle.drop()
os.sleep(2)
turtle.select(4)
turtle.drop()
turtle.select(5)
turtle.drop()
turtle.select(6)
turtle.drop()
turtle.select(7)
turtle.drop()
turtle.select(8)
turtle.drop()
turtle.select(9)
turtle.drop()
os.sleep(2)
turtle.select(10)
turtle.drop()
turtle.select(11)
turtle.drop()
turtle.select(12)
turtle.drop()
turtle.select(13)
turtle.drop()
turtle.select(14)
turtle.drop()
turtle.select(15)
turtle.drop()
turtle.select(16)
turtle.drop()
HPWebcamAble #2
Posted 20 July 2015 - 07:48 PM
Line 62 has a comma instead of a period




Also, I'd like to mention that you can compact this with loops:

for i = 1, 10 do --# repeats 10 times
  turtle.forward()  --# turtle.forward doesn't take any arugments
  turtle.digDown()
end

And ejecting the entire inventory:

for i = 1, 16 do --# Turtle has 16 slots, so this has to repeat 16 times
  turtle.select(i) --# Selects 'i', which is the current iteration
  turtle.drop()
end
Edited on 20 July 2015 - 05:52 PM