augustclear

Check Location

Dec 18th, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. id = rednet.lookup("worker","ana")
  2. print("Ping")
  3. if id == nil then
  4.     print("Can't find worker")
  5.     return
  6. else
  7.     print("ID:"..tostring(id))
  8.     rednet.send(id, "location", "worker")
  9. end
  10. sender, message = rednet.receive("home",5)
  11. if message == nil then
  12.     print("Timeout")
  13. else
  14.     print(message)
  15. end
Advertisement
Add Comment
Please, Sign In to add comment