150 posts
Posted 05 April 2015 - 06:46 AM
I am having a problem loading a gps x y z coord in to a table i tried POS = textutiles.serialize(gps.locate(3)) which didn't work for some stupid reason and i tried POS = gps.locate(3) but that just loaded x to var POS. can someone please help me.
Thanks in advance
1220 posts
Location
Earth orbit
Posted 05 April 2015 - 06:58 AM
I believe you need to capture the output in a table like so…
local POS = { gps.locate(3) }
POS[1] will = x
POS[2] will = y
POS[3] will = z
150 posts
Posted 05 April 2015 - 06:59 AM
Let me try that
756 posts
Posted 05 April 2015 - 06:59 AM
Either do it like "local x, y, z = gps.locate(3)" or "local pos = textutils.serialize({gps.locate(3)})"
Edit: Ninja'd
Edited on 05 April 2015 - 05:00 AM
150 posts
Posted 05 April 2015 - 07:05 AM
I know about x,y,z= gps.locate() i need it to be loaded to a table. the second method seems to be workable. the server i tested my code on is offline so i can't check right now