Jump to content


_XD_XD_XD_'s Content

There have been 2 items by _XD_XD_XD_ (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#29562 Home Core

Posted by _XD_XD_XD_ on 03 September 2012 - 04:35 PM in Ask a Pro

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_



#29557 Home Core

Posted by _XD_XD_XD_ on 03 September 2012 - 04:19 PM in Ask a Pro

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_