rs.setOutput("back", false)
rs.setOutput("left", true)
monitor.clear()
monitor.setCursorPos(1,1)
monitor.setTextColor(colors.blue)
monitor.write"Lights: "
monitor.setTextColor(colors.red)
monitor.write "Off"
monitor.setCursorPos(1,2)
monitor.setTextColor(colors.blue)
monitor.write"Lockdown: "
monitor.setTextColor(colors.red)
monitor.write"Off"
while true do
term.clear()
term.setCursorPos(1,1)
print"Welcome Warlock, what may I do for you?"
input = read()
if input == "lights on" then
print"Turning lights on now…"
monitor.clear()
monitor.setCursorPos(1,1)
monitor.setTextColor(colors.blue)
monitor.write "Lights: "
monitor.setTextColor(colors.green)
monitor.write"On"
monitor.setCursorPos(1,2)
monitor.setTextColor(colors.blue)
monitor.write"Lockdown: "
monitor.setTextColor(colors.red)
monitor.write"Off"
rs.setOutput("back", true)
sleep(3)
elseif input == "lights off" then
print "Turning lights off now…"
rs.setOutput("back", false)
monitor.clear()
monitor.setCursorPos(1,1)
monitor.setTextColor(colors.blue)
monitor.write"Lights: "
monitor.setTextColor(colors.red)
monitor.write"Off"
monitor.setCursorPos(1,2)
monitor.setTextColor(colors.blue)
monitor.write"Lockdown: "
monitor.setTextColor(colors.red)
monitor.write"Off"
sleep(3)
elseif input == "lockdown" then
while true do
term.clear()
term.setCursorPos(1,1)
rs.setOutput("left", false)
rs.setOutput("back", false)
monitor.clear()
monitor.setCursorPos(1,1)
monitor.setTextColor(colors.red)
monitor.write"Lights: "
monitor.setTextColor(colors.red)
monitor.write"Off"
monitor.setTextColor(colors.blue)
monitor.setCursorPos(1,2)
monitor.write"Lockdown: "
monitor.setTextColor(colors.green)
monitor.write"On"
print "LOCKDOWN ACTIVATED, ALL DOORS AND LIGHTS SHUT OFF, ENTER PASSWORD TO DEACTIVATE:"
lockdown = read()
if lockdown == "stop" then
print "Lockdown deactivated, all systems returning to normal."
monitor.clear()
monitor.setCursorPos(1,1)
monitor.setTextColor(colors.blue)
monitor.write"Lights: "
monitor.setTextColor(colors.green)
monitor.write"On"
monitor.setCursorPos(1,2)
monitor.setTextColor(colors.blue)
monitor.write"Lockdown: "
monitor.setTextColor(colors.red)
monitor.write "Off"
rs.setOutput("back", true)
rs.setOutput("left", true)
sleep(3)
break
else
print "Wrong, lockdown continued."
sleep(1)
elseif input == "disable power" then
modem.transmit(0,0,"Disable")
while true do
print "Power Disabled, shall I activate the backup generator?"
power = read()
if power == "yes" then
modem.transmit(0,0,"Backup")
print "Backup Generator activated"
sleep(3)
break
elseif power == "no" then
print "Generator Ignored"
sleep(3)
elseif input == "enable power" then
while true do
print "Enabling the power will deactivate the backup generator, are you sure?"
backup = read()
if backup == "yes" then
print "Power re-enabled"
modem.transmit(0,0, "Enable")
sleep(3)
break
elseif backup == "no" then
print "Power still disabled"
sleep(2)
end
end
end
end
end
end
This is a program which controls the main computer of my base, and everytime I try and load it, it gives the error:
bios:366: [string"startup"]:89: 'end' expected (to close if at line 69)
I don't know what's happening, if someone could reply saying what's wrong with it and what I need to change, that would be great.
From lines 1-89 it worked fine, then I added in the power command and it all went balls up. I really need this fixed, as i cannot run the house without it.
-Bw