Posted 08 March 2015 - 04:11 PM
I'm not sure why this is happening, but I am trying to rewrite rednet,send, and this is my (debugging) code:
function send( nRecipient, sMessage )
for n,sSide in ipairs( rs.getSides() ) do
if rednet.isOpen( sSide ) then
peripheral.call( sSide, "transmit", nRecipient, os.getComputerID(), sMessage )
return true
end
end
error( "No open sides" )
end
send(1, "foo")
rednet.send(1, "bar")
And for some reason, even though my send function code is directly copied from computercrafts source, the send function doesn't get through (I know peripheral.call got executed, yet nothing shows up on the other side) but rednet.send works just fine. Does anyone know why and how to fix it? (My current theory is that the send() function isn't generating a rednet_message event, and therefore rednet.receive() ignores it, but I'm not sure how to fix that)