Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.find("modem") or error("No modem attached", 0)
- modem.open(0)
- while true do
- local event, side, channel, replyChannel, message, distance = os.pullEvent("modem_message")
- print(("Message received on side %s on channel %d (reply to %d) from %f blocks away with message %s"):format(
- side, channel, replyChannel, distance, tostring(message)
- ))
- end
Add Comment
Please, Sign In to add comment