Posted 31 December 2013 - 08:19 AM
oldPull = os.pullEvent
os.pullEvent = os.pullEventRaw
local bulletin = fs.open("bulletin","a")
local mon = peripheral.wrap("top") --peripheral.wrap("monitor")
mon.clear()
mon.setCursorPos(1,1)
mon.setTextScale(5)
mon.write("NEWS")
mon.setTextScale(3)
rednet.open("back")
while true do
ev, id, msg = os.pullEvent()
if ev == "rednet_message" then
bulletin.flush(id..")"..msg)
print(id..")"..msg)
mon.write(id..")"..msg)
elseif ev == "terminate" then
os.pullEvent = oldPull
bulletin.close()
shell.exit()
end
end
I get an attempt to call nil on the line bulletin.flush(id..")"..msg)
And here's the sender code:
rednet.open("back")
while true do
rednet.broadcast(read())
end
Edited on 31 December 2013 - 08:09 AM