Hi,

                    if (ch = ",")

In this line, you are trying com assign, not compare. Comparing in use
use the == operator (2 equal signs).
But you are trying to compare a char to a pointer to a char. Try this instead:
if (ch == ',')

The diference is:
"," -> a pointer to a region of the memory where the value of comma is stored
','  -> the integer value of the comma character

The problem with the StrCat is more dificult to fix.

Try this:
if (StrStr(StrToSearch, "$GPGGA") != NULL) {

              UInt16 pGPSStr = StrStr(StrToSearch, "$GPGGA") - StrToSearch;
              UInt16 bufLen = StrLen(StrToSearch);
              WChar ch = 0;
              UInt8 CommaCount = 0;
              WChar temp[2]; // <- this line is new

              temp[1] = 0; // <- this line is new

              while ((pGPSStr < bufLen) && (CommaCount < 6)) {
              pGPSStr += TxtGetNextChar(StrToSearch, pGPSStr, &ch);
                  if (ch = ",")
                      CommaCount++;
                      else {
                          temp[0] = ch; // <- this line is new
                          switch (CommaCount) {
                              case 0:
                                      StrCat(GPSData.GPSID, temp); //
<- changed ch for temp
                                      break;

I hope this will work for you... i didn't pay attencion to all the data types.

Good luck,

Ricardo

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to