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

bios:14 ',' expected

Started by 0xHexa, 23 January 2016 - 04:21 AM
0xHexa #1
Posted 23 January 2016 - 05:21 AM

function main()
    print("Started Mining 3x3 for 75 blocks!")
    turtle.select(1)
    turtle.refuel()
    for i = 0; 75 do
	 if turtle.detect() then
	  turtle.dig()
	 end
   turtle.up()
    if turtle.detect() then
	 turtle.dig()
    end
   turtle.forward()
   turtle.turnLeft()
    if turtle.detect() then
	 turtle.dig()
    end
   turtle.down()
    if turtle.detect() then
	 turtle.dig()
    end
   turtle.up()
   turtle.turnRight()
   turtle.turnRight()
    if turtle.detect() then
	 turtle.dig()
    end
   turtle.down()
    if turtle.detect() then
	 turtle.dig()
    end
   turtle.turnLeft()
  end
turtle.turnRight()
while not turtle.detect() do
  turtle.forward()
end
end
Lyqyd #2
Posted 23 January 2016 - 05:47 AM
I doubt this is your whole code, but for loops in Lua use commas, not semicolons.
0xHexa #3
Posted 23 January 2016 - 06:28 AM
Thanks man! Sadly it is haha I whipped it up in a few minutes due to me just getting back into feed the beast and coding again.
Edited on 23 January 2016 - 06:10 AM