Jump to content




Botania Orechid automation script not working?

turtle

1 reply to this topic

#1 Braxbro

  • New Members
  • 1 posts

Posted 11 March 2017 - 02:04 PM

I made a script for automating the Orechid from Botania, but it doesn't do anything.

local stone = 1
rs.setAnalogOutput("top",15)
while true do
turtle.select(stone)
while turtle.getItemCount() > 1 do
turtle.place()
while turtle.compare() = false do
sleep(1)
end
turtle.dig()
end
rs.setOutput("top",true)
while turtle.getItemCount() < 64 do
sleep(1)
end
rs.setOutput("top",false)
end

The error it provides is:

bios:14: [string "ore"]:7: "do" expected


#2 The Higher Realm

  • Members
  • 23 posts
  • LocationUSA

Posted 11 March 2017 - 07:25 PM

On line 7 you have:
while turtle.compare() = false do

You're missing another equal sign. Two equal signs compare, one sets the value.
You should also indent your code.

local stone = 1
rs.setAnalogOutput("top",15)
while true do
  turtle.select(stone)
  while turtle.getItemCount() > 1 do
    turtle.place()
    while turtle.compare() == false do
     sleep(1)
    end
    turtle.dig()
  end
  rs.setOutput("top",true)
  while turtle.getItemCount() < 64 do
    sleep(1)
  end
  rs.setOutput("top",false)
end

Edited by Actiquack322, 11 March 2017 - 07:29 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users