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

[Lua][Error] bios:206: [string "startup"]:25: 'end' expected

Started by zeus5966, 25 October 2012 - 01:56 AM
zeus5966 #1
Posted 25 October 2012 - 03:56 AM
So, I don't know where this magical end needs to be. All if and else statements are closed at the end. Anyhow,


help = "Acceptable inputs are Pumpkin Farm, Farms, Portal and factory"
while true do
term.clear()
term.setCursorPos(1,1)
print("Where would you like to go?")
input = read()
if input == "Pumpkin Farm" then
  rs.setBundledOutput("back", 1)
  sleep(30)
else if input == "Farms" then
  rs.setBundledOutput("back", 3)
  sleep(30)
else if input == "Portal" then
  rs.setBundledOutput("back", 7)
  sleep(35)
else if input == "Factory" then
  rs.setBundledOutput("back", 15)
  sleep(40)
else
  print(help)
  sleep(5)
end
end

Thanks for any help given!
Kingdaro #2
Posted 25 October 2012 - 03:59 AM
You wrote "else if" when it should be "elseif".
zeus5966 #3
Posted 25 October 2012 - 04:27 AM
You wrote "else if" when it should be "elseif".

Thank you!
Kingdaro #4
Posted 25 October 2012 - 04:34 AM
Glad I could help. ^^