Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = {...}
- rednet.open("back")
- id = tArgs[1]
- while true do
- if gps.locate() then
- location = {gps.locate()}
- location[1] = math.floor(location[1])
- location[2] = math.floor(location[2])
- location[3] = math.floor(location[3])
- elseif throwError then
- print("ALERT: GPS tower out of range. Turtle will travel to last known location, at X: " .. x .. ", Y: " .. y .. ", Z: " .. z)
- end
- if gps.locate() then
- throwError = true
- else
- throwError = false
- end
- rednet.send(tonumber(id), location)
- --print(location[1], location[2], location[3])
- sleep(.01)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement