Advertisement
Guest User

lead

a guest
May 22nd, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. rednet.open("back")
  2.  
  3.  
  4.  
  5. while true do
  6.   if gps.locate() then
  7.     location = {gps.locate()}
  8.   elseif throwError then
  9.     print("ALERT: GPS tower out of range. Turtle will travel to last known location, at X: " .. x .. ", Y: " .. y .. ", Z: " .. z)
  10.   end
  11.   if gps.locate() then
  12.     throwError = true
  13.   else
  14.     throwError = false
  15.   end
  16.   rednet.send(id, location)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement