Posted 02 June 2013 - 10:11 PM
Alright, in the second function, it is supposed to keep me updated on the status of the AE network. Sending works fine and that thread works fine (I had it print to computer screen every time it got a message.)
In a test program, I can write to the monitor of the same side. In this program, I can tell it to write to the monitor anywhere in the code and no-go. Any ideas as to what stupid thing I"m missing? No errors show up. I just can't get text to stay on the monitor beside the computer. >.<
http://pastebin.com/rKGS7E91
In a test program, I can write to the monitor of the same side. In this program, I can tell it to write to the monitor anywhere in the code and no-go. Any ideas as to what stupid thing I"m missing? No errors show up. I just can't get text to stay on the monitor beside the computer. >.<
http://pastebin.com/rKGS7E91
Spoiler
rednet.open("left")
monitor = peripheral.wrap("right")
monitor.clear()
monitor.write("Test") --This part fails.
function sendData()
while true do
shell.run("clear")
print("You can turn on and off AE grid here:")
tosendData = read()
if tosendData == "off" or tosendData == "OFF" then
print("Cutting off AE power grid...")
rednet.send(1,"off")
print("Looking for response...")
id,message = rednet.receive(1)
if message == "ack" then
print("Power system has been cut off!")
sleep(2)
end
elseif tosendData == "on" or tosendData == "ON" then
print("Turning on AE power grid...")
rednet.send(1,"on")
id,message = rednet.receive(1)
if message == "ack" then
print("Power system has been turned on!")
sleep(2)
else
print("Retrying one more time...")
rednet.send(1,"on")
id,message = rednet.receive()
if message == "ack" then
print("Power system has been turned on!")
sleep(2)
else
print("Message failed. Please try again.")
sleep(2)
end
end
else
print("That's not a possible option.")
sleep(2)
end
sleep(.1)
end
end
function getAEPower()
while true do
who,message = rednet.receive()
if message == "on" then
monitor.clear()
monitor.write("AE Power: ON")
elseif message == "off" then
monitor.clear()
monitor.write("AE Power: OFF")
end
sleep(.1)
end
end
shell.run("clear")
print("Starting up Client...")
parallel.waitForAll(sendData, getAEPower)