function listen()
local id, msg, dst
print("Listening")
while(true) do
id, msg, dst = rednet.receive(10)
print("Received ", msg)
if (msg == "toggle") then
redstone.setOutput("right", true)
sleep(0.6)
redstone.setOutput("right", false)
else
rednet.send(id, "13")
end
end
end
gives the error rednet:39: Expected number
when it receives the senders message:
rednet.send(a[y]["send"], "toggle")
and the code outputs
Listening Received
The msg variable is not output, and I tried printing id before Received, which caused neither of them to print.












