Here, I rewrote your program(s) to reflect what it is actually doing:
Spoiler
rednet.open("top")
while true do
term.clear()
term.setCursorPos(1,1)
print("Graywolf Industries forcefield control terminal:")
print("Waiting for wireless commands, manual entry not permitted.")
id,message = rednet.receive()
if id == 9 or id == 10 then
if message == nil then
term.clear()
term.setCursorPos(1,1)
print("Wireless input recieved, forcefield coming online...")
rs.setOutput("left", true)
sleep(1)
elseif message == nil then
term.clear()
term.setCursorPos(1,1)
print("Wireless input recieved, forcefield coming offline...")
rs.setOutput("left", false)
sleep(1)
end
end
end
Spoiler
rednet.open("back")
while true do
term.clear()
term.setCursorPos(1,1)
print("Graywolf Industries portable control terminal")
print("Please enter your administration password:)")
local i = read("*")
if i == ("4969") then
term.clear()
term.setCursorPos(1,1)
print("Password accepted. Enter a command: launch1, launch2, launch3, launch4, launchall, forceon, forceoff")
local i2 = read()
if i2 == ("launch1") then
print("Launching missile silo 1 at preconfigured target! Silo will be reloaded in 14 seconds...")
rednet.send(4, nil)
sleep(1)
elseif i2 == ("launch2") then
print("Launching missile silo 2 at preconfigured target! Silo will be reloaded in 14 seconds...")
rednet.send(5, nil)
sleep(1)
elseif i2 == ("launch3") then
print("Launching missile silo 3 at preconfigured target! Silo will be reloaded in 14 seconds...")
rednet.send(6, nil)
sleep(1)
elseif i2 == ("launch4") then
print("Launching missile silo 4 at preconfigured target! Silo will be reloaded in 14 seconds...")
rednet.send(7, nil)
sleep(1)
elseif i2 == ("launchall") then
print("Launching all missiles at preconfigured targets! Silos will be reloaded in 14 seconds...")
rednet.send(4, nil)
rednet.send(5, nil)
rednet.send(6, nil)
rednet.send(7, nil)
sleep(1)
elseif i2 == ("forceon") then
print("Turning on forcefield, may take a while...")
rednet.send(8, nil)
sleep(1)
elseif i2 == ("forceoff") then
print("Turning off forcefield...")
rednet.send(8, nil)
sleep(1)
else
print("Incorrect command! Please try again.")
end
end
end
Since you either send it nil or nil, message will always equal nil in the first statement. Basically, when you think you are telling it to turn off, you are telling it to turn on.
Edit2: If you don't believe me, run this:
if forceon == forceoff then
print( "They are equal!" )
else
print( "They are not equal!" )
end