Posted 04 July 2015 - 02:58 AM
So I'm tying to get a bunch of Computers in my base to send messages to a master computer in my control room updating me about things in my base like my quarry turning off or crafting job done or Reactor turning on well the receiver (master control computer) code is not working well could use help.
So my function won't call if I just is like error attempt to call. So yeah FYI the minion computers just broadcast a message with the protocol SigmaSum and true or false if they are receiving redstone.
mon = peripheral.wrap("right")
rednet.open("left")
mon.clear()
data = {{3,"Reactor"},{4,"Quarry"}}
while true do
id, message = rednet.receive("SigmaSum", 10)
if message == true then
message = "ON"
else
message = "OFF"
end
mon.write(data[find()][2] .." " ..message)
newLine()
end
function find()
for i=1,#data do
if data[i][1] == id then
return i
end
end
return 0
end
function newLine()
local _,cY = mon.getCursorPos()
mon.setCursorPos(1,cY+1)
end
So my function won't call if I just is like error attempt to call. So yeah FYI the minion computers just broadcast a message with the protocol SigmaSum and true or false if they are receiving redstone.