Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function send(message)
- rednet.open("top") -- Open the modem on the top side
- print("Sending test message to server...")
- rednet.broadcast(message, "testProtocol")
- print("Message sent!")
- end
- function recieve()
- rednet.open("top") -- Open the modem on the top side
- while true do
- local senderID, message, protocol = rednet.receive() -- Wait for incoming message
- print("Received message from ID: " .. senderID)
- print("Message: " .. message)
- end
- end
- print("Type a Message")
- send(read())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement