Advertisement
DOGGYWOOF

Untitled

Oct 24th, 2024 (edited)
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. -- Load the necessary Rednet API
  2. rednet.open("left") -- Ensure your modem is connected to the back side
  3.  
  4. print("Listening for Rednet messages...")
  5.  
  6. while true do
  7. local senderId, message, protocol = rednet.receive() -- Listen for incoming messages
  8. print(string.format("Received from %d: %s (Protocol: %s)", senderId, message, protocol))
  9. end
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement