my code for so far is this:
wifi = peripheral.wrap("left") lan = peripheral.wrap("top") wifi.open(2220) lan.open(1110) while true do local event, value1, value2, value3, value4, value5 = os.pullEvent() if event == "modem_message" then if string.sub(value4,0,5) == "wifi#" or string.sub(value4,0,4) == "lan#" then rednetArr = split(value4,"#") if #rednetArr == 1 then lan.transmit( value3, 1110,"error ocured while sending1") elseif #rednetArr == 2 then if rednetArr[1] == "wifi" then wifi.broadcast(rednetArr[2]) else lan.transmit( value3, 1110,"error ocured while sending2") end elseif #rednetArr == 3 then if rednetArr[1] == "wifi" then wifi.transmit(tonumber(rednetArr[2]), 2220,rednetArr[3]) else lan.transmit(tonumber(rednetArr[2]), 1110,rednetArr[3]) end elseif #rednetArr == 4 then -- specific pc and protocol end end end endwith most of the other code gone to get it clear, the problem is on line 14 where wifi.broadcast() is called.
how can i get a way to reach the whole spectrum without using rednet.