Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- print("Active!")
- while true do
- sender,message = rednet.receive("spynet")
- if message == "retrieve" then
- x,y,z = gps.locate()
- if not x then
- rednet.broadcast("GPS Error","spynet")
- else
- x = math.floor(x+0.5)
- y = math.floor(y+0.5)
- z = math.floor(z+0.5)
- rednet.broadcast(x..","..y..","..z,"spynet")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment