For some reason my code is no longer working, it doesn't seem to be tracking the location and therefore is not able to do anything on location changed. I wonder if it is an issue with my code? Or could it be in the xcode simulator or the properties?
Heres the Start button script:
Code: Select all
global counterVar
on mouseUp
put 0 into counterVar
mobileStartTrackingSensor "location"
end mouseUp
Code: Select all
on locationChanged pLatitude, pLongitude, pAltitude
put pAltitude & cr after field "altitude"
put pLatitude & cr after field "latitude"
put pLongitude & cr after field "longitude"
put counterVar into field "counter"
add 1 to counterVar
put the short date && the short time into field "dateTest"
end locationChanged pLatitude, pLongitude, pAltitude