Jump to content




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


  • This topic is locked This topic is locked
3 replies to this topic

#1 zeus5966

  • Members
  • 4 posts

Posted 25 October 2012 - 02: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!

#2 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 25 October 2012 - 02:59 AM

You wrote "else if" when it should be "elseif".

#3 zeus5966

  • Members
  • 4 posts

Posted 25 October 2012 - 03:27 AM

View PostKingdaro, on 25 October 2012 - 02:59 AM, said:

You wrote "else if" when it should be "elseif".

Thank you!

#4 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 25 October 2012 - 03:34 AM

Glad I could help. ^^





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users