Jump to content




Home Core


2 replies to this topic

#1 _XD_XD_XD_

  • New Members
  • 2 posts

Posted 03 September 2012 - 04:19 PM

Hi, I have spent hours looking for my mistake in this 'Home Core' program I am writing, and I still cant find it!

It says :

bios:206: [string "startup"]:19: 'eof' expected

and here is the code :

fs.delete("startup")
fs.copy("disk/startup", "startup")
print ("Welcome To The Core")
print ("-----------------------------------")
print ("Lights")
print ("To access lighting menu type : 'Lighting'")
sleep(3)
print (" ")
print ("Energy")
print ("To access energy menu type : 'Energy'")
sleep(3)
print (" ")
print ("Self Destruct")
print ("To activate self desruct sequence type : 'Boom'")
input = read()
elseif input == ("Lighting") then
print ("Lighting")
print ("-----------------------------------")
print (" ")
print ("To turn lights on type : 'On'")
print ("To turn lights off type : 'Off'")
print ("To return to previous menu type : 'Exit'")
light = read()
elseif light == "On" then
rs.setOutput("back", true)
elseif light == "on" then
rs.setOutput("back", true)
elseif light == "Off" then
rs.setOutput ("back", false)
elseif light == ("off") then
rs.setOutput ("back", false)
elseif light == "Exit" then
shell.run "startup"
end
elseif input == ("Energy") then
print ("Energy")
print ("-----------------------------------")
print (" ")
print ("To turn energy generation on on type : 'On'")
print ("To turn energy generation off type : 'Off'")
print ("To return to previous menu type : 'Exit'")
en = read()
elseif en == "On" then
rs.setOutput("left", true)
elseif en == "on" then
rs.setOutput("left", true)
elseif en == "Off" then
rs.setOutput ("left", false)
elseif en == ("off") then
rs.setOutput ("left", false)
elseif en == "Exit" then
shell.run "startup"
end
elseif input == ("Boom") then
print ("Self Destruct")
print ("-----------------------------------")
print (" ")
print ("To accept total annialation on on type : 'Ok'")
print ("To stop total annialation type : 'No'")
print ("To return to previous menu type : Exit")
pop = read()
if pop == "Ok" then
rs.setOutput("right", true)
elseif pop == "No" then
shell.run "startup"
elseif pop == "Exit" then
shell.run "startup"
end
end

Many thanks to anyone who can help

_XD_XD_XD_

#2 Kazimir

  • Members
  • 90 posts
  • Locationthat's no moon...

Posted 03 September 2012 - 04:21 PM

"elseif" should not stand before the "if"

#3 _XD_XD_XD_

  • New Members
  • 2 posts

Posted 03 September 2012 - 04:35 PM

View PostKazimir, on 03 September 2012 - 04:21 PM, said:

"elseif" should not stand before the "if"

Thanks, there was some more code before that before and I must have missed that when re-writing thanks alot

_XD_XD_XD_





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users