Posted 17 July 2012 - 09:36 PM
there was already a topic abu this but i wanted to make my own
im getting the error
bios 206 [string reactor]:3: '<name>' expected
im getting the error
bios 206 [string reactor]:3: '<name>' expected
term.clear()
term.setCursorPos(1,1)
local [1] = "OpenReactorRoom"
local [2] = "ReactorCooling"
local [3] = "ReactorState"
local [4] = "Exit"
print("Reactor Control System v1.2")
sleep(2)
print("Enter "[1]" To access the reactor room.")
print("Enter "[2]" to turn on reactor cooling system.")
print("Enter "[3]" to turn reactor state On/off")
write("Control Function? : ")
local input = read()
if input == [1] then
term.clear()
term.setCursorPos(1,1)
print("Opening the reactor room...")
c = colors.combine( c, colors.orange )
rs.setBundledOutput("bottom", c )
sleep(1)
term.clear()
term.setCursorPos(1,1)
print("To close door Enter "Close"")
write("Control Function? : ")
local secondinput = read()
if secondinput == C then
term.clear()
term.setCursorPos(1,1)
print("Closing reactor door...")
sleep(1)
c = colors.subtract( c, colors.orange )
rs.setBundledOutput("bottom", c )
shell.run("Control")
else
term.clear()
term.setCursorPos(1,1)
print("Command incorrect, shutting down.")
rs.setOutput("right",false)
rs.setOutput("left",false)
rs.setOutput("up",false)
rs.setOutput("down",false)
rs.setOutput("back",false)
rs.setOutput("bottom",false)
sleep(2)
os.reboot()
end
elseif input == [2] then
term.clear()
term.setCursorPos(1,1)
print ("Reactor Cooling System Actived")
c = colors.combine( c, colors.white )
rs.setBundledOutput("bottom", c )
sleep (1)
term.clear()
term.setCursorPos(1,1)
print ("To turn off Cooling System Enter "Off"")
write (" Control Function? : ")
local secondinput = read()
if secondinput == O then
term.clear()
term.setCursorPos(1,1)
print ("Cooling System Shutting Down")
sleep (2)
c = colors.subtract( c, colors.white )
rs.setBundledOutput("bottom", c )
sleep (2)
shell.run("Control")
end
elseif input == [3] then
term.clear()
term.setCursorPos(1,1)
print ("Reactors Coming Online")
c = colors.combine( c, colors.white, colors.magenta )
rs.setBundledOutput("bottom", c )
sleep (1)
term.clear()
term.setCursorPos(1,1)
print ("To turn Reactors Off Enter "Off"")
write ("Control Function? : ")
local thirdinput = read()
if thirdinput == O
term.clear()
term.setCursorPos (1,1)
print ("Reactors Shutting Down. Standby.")
c = colors.subtract( c, colors.white, colors.magenta )
rs.BundledOutput("bottom", c )
sleep(2)
shell.run("Control")
else
term.clear()
term.setCursorPos(1,1)
print("Command incorrect, shutting down.")
rs.setOutput("right",false)
rs.setOutput("left",false)
rs.setOutput("up",false)
rs.setOutput("down",false)
rs.setOutput("back",false)
rs.setOutput("bottom",false)
sleep (2)
os.reboot()
end
else
term.clear()
term.setCursorPos(1,1)
print("Command incorrect, shutting down.")
rs.setOutput("right",false)
rs.setOutput("left",false)
rs.setOutput("up",false)
rs.setOutput("down",false)
rs.setOutput("back",false)
rs.setOutput("bottom",false)
sleep (2)
os.reboot()
end