Page 2 of 2

Re: locking GPS coordinates

Posted: January 15th, 2016, 4:19 pm
by jfigueroa
I know it could be a bit late, but also for everyone who needs it, you can use the demode() function.

For ex:

Code: Select all

if demode() = 1 then
      if gps(open)and gps(read, 60) then
          LAT=gps(latitude);
          LON=gps(longitude);
      endif;
      gps(close);
endif;
That means that it would only ask for gps read when you are in add mode, (to input new cases).
If you are in modify or verify mode, it will doesn´t ask for it. So the value wont change on that cases.

Regards to everyone.
Joshua Figueroa.

Re: locking GPS coordinates

Posted: February 23rd, 2016, 2:40 am
by rcovane
That code is not working for me, what am I doing wrong? It shows this error "ERROR: Invalid character expression near line 17 in COORDENADAS procedure".

Code: Select all

if visualvalue(LATITUDE) = notappl and COORDENADAS=1 then
  if gps(open) and gps(read, 60) then
    LATITUDE=gps(latitude);
    LONGITUDE=gps(longitude);
  endif;
  gps(close);
endif;

Re: locking GPS coordinates

Posted: February 23rd, 2016, 7:50 am
by josh
That is a syntax error. Check that the variables that you use on line 17 are valid variable names and are spelled correctly.