Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ReceivedData = {};
- function ReceiveLoop(recProtocol)
- while true do
- local sender,message,protocol = rednet.receive(recProtocol);
- ReceivedData[#ReceivedData + 1] = {Sender = sender,Message = message, Protocol = protocol};
- end
- end
- function GetReceivedData()
- local tmp = ReceivedData;
- ReceivedData = {};
- return tmp;
- end
Advertisement
Add Comment
Please, Sign In to add comment