Advertisement
Pixxel124

CC turtle wireless

Mar 15th, 2023 (edited)
642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. function receiveLoop()
  2.    local modem = peripheral.wrap("right")
  3.    modem.open(2)
  4.    local m = ""
  5.    while m ~= "close" do
  6.       local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
  7.       m = message .. "\n"
  8.       io.write(m)
  9.    end
  10. end
  11.  
  12. receiveLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement