Adding numbers to a field SOLVED
Posted: Fri Jan 16, 2015 5:21 pm
Hello,
I am trying to figure out a way of adding numbers to a field (currently I am adding the latitude to a field each time the location changes).
I want each number to be added to the field but on a new line.
Then, when I press the stop button (which stops tracking the location) I would like to be able to get the highest and lowest values.
Currently I have this script on the card which adds the latitude values to the field but they dont take a new line each time one is added:
I am trying to figure out a way of adding numbers to a field (currently I am adding the latitude to a field each time the location changes).
I want each number to be added to the field but on a new line.
Then, when I press the stop button (which stops tracking the location) I would like to be able to get the highest and lowest values.
Currently I have this script on the card which adds the latitude values to the field but they dont take a new line each time one is added:
Code: Select all
global counterVar
global allXCoords
on locationChanged pLatitude, pLongitude, pAltitude
put pAltitude into field "altitude"
put pLatitude into field "latitude"
put pLongitude into field "longitude"
put counterVar into field "counter"
add 1 to counterVar
put counterVar into field "counter"
put pLatitude & comma after allXCoords
put allXCoords into field "allX"
end locationChanged pLatitude, pLongitude, pAltitude
on errorDialog pExecutionError, pParseError
answer "An error occurred on line: " & item 2 of line 1 of pExecutionError & cr & pExecutionError
end errorDialog