Guest User

receive.lua

a guest
Feb 17th, 2024
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. mon = peripheral.wrap("left")
  2. rednet.open("right")
  3.  
  4. while true do
  5.   local sid, msg, dis = rednet.receive()
  6.  
  7.   time = os.time()
  8.   time = textutils.formatTime(time)
  9.  
  10.   mon.clear()
  11.   mon.setCursorPos(1, 1)
  12.   mon.write(time)
  13.   mon.setCursorPos(1, 2)
  14.   mon.write(sid..":"..msg)
  15. end
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment