Posted 22 July 2015 - 07:19 PM
I've moved through most of my own bugs but this one has me stumped.
My idea was to take a timer I saw on https://www.youtube.com/watch?v=IR-e1D4TIUU and have it trigger my reed farming turtle and have it display on a monitor on the left of the turtle.
Asside from my math being wrong I can't find my syntax error or whatever is gumming up. Any help would be much appreciated. Also i'm very new to this.
Getting ')" expected on line 18.
http://pastebin.com/kRxnUjmb
local m = 33
local s = 0
repeat
if m > 0 then
if s > 0 then
s = s - 1
else
s = 59
m = m - 1
end
else
if s > 0 then
m = m - 1
end
end
mon.write("m..":"s.." )
sleep(60)
if m == 0, s == 0 then
print("Turtle is farming")
turtle.select(1)
turtle.refuel(1)
turtle.up()
turtle.up()
turtle.up()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.down()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.down()
turtle.down()
turtle.down()
turtle.turnLeft()
turtle.turnLeft()
turtle.select(2)
turtle.drop()
os.sleep(2000)
i= i + 1
until i == 5
My idea was to take a timer I saw on https://www.youtube.com/watch?v=IR-e1D4TIUU and have it trigger my reed farming turtle and have it display on a monitor on the left of the turtle.
Asside from my math being wrong I can't find my syntax error or whatever is gumming up. Any help would be much appreciated. Also i'm very new to this.
Getting ')" expected on line 18.
http://pastebin.com/kRxnUjmb
Code
local mon = peripheral.wrap("left")local m = 33
local s = 0
repeat
if m > 0 then
if s > 0 then
s = s - 1
else
s = 59
m = m - 1
end
else
if s > 0 then
m = m - 1
end
end
mon.write("m..":"s.." )
sleep(60)
if m == 0, s == 0 then
print("Turtle is farming")
turtle.select(1)
turtle.refuel(1)
turtle.up()
turtle.up()
turtle.up()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.down()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.down()
turtle.down()
turtle.down()
turtle.turnLeft()
turtle.turnLeft()
turtle.select(2)
turtle.drop()
os.sleep(2000)
i= i + 1
until i == 5