Shop OBEX P1 Docs P2 Docs Learn Events
Problems in source code — Parallax Forums

Problems in source code

TimyTimy Posts: 10
edited 2005-06-08 07:47 in BASIC Stamp
An error occurred while compling the source code.
The error occurred in line 135. Do you know how to·correct it?
The Stamp I'm using BS2.

Comments

  • daviddrakedaviddrake Posts: 20
    edited 2005-06-08 04:37
    Dear Timy,

    The code compiles on version 2.2 just fine. Line 135 is a goto statement that points to the very next executable line:


    134 DEBUG "Call connected."
    135 GOTO here

    here:
    DEBUG "check"
    SERIN thru

    This is odd as program flow should proceed to "here" anyway. Is this the code that originally failed for you? What was the syntax error message?

    David Drake
  • TimyTimy Posts: 10
    edited 2005-06-08 05:34
    The error message was "exepcted a variable".

    The part in error is this line:

    retrieve_GPS1:
    SERIN GPSpin, BaudMode,3000,No_GPS_Detected, [noparse][[/noparse]WAIT("GPRMC,"), SPSTR 65]
    GOSUB Parse_GPS_Data
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-08 06:03
    Hello,

    ·· David is correct...The code compiles as-is.· What version of the Stamp Software are you using?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • TimyTimy Posts: 10
    edited 2005-06-08 06:39
    hi,

    THe version of the stamp software i am using is BASIC Stamp Editor v2.2.
  • TimyTimy Posts: 10
    edited 2005-06-08 07:21
    hi,
    I know that this code compiled properly using the stamp software BASIC Stamp Editor v2.2 but it is when using the basic Stamp Bs2p. if you just change the the stamp from ' {$STAMP BS2p} to ' {$STAMP BS2} without editing the codes...The codes will fail to compile properly.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-06-08 07:47
    Timy -

    That is completely understandable. Here is the area in question:

    retrieve_GPS1:
    SERIN GPSpin, BaudMode,3000,No_GPS_Detected, [noparse][[/noparse]WAIT("GPRMC,"), SPSTR 65]
    GOSUB Parse_GPS_Data

    SPSTR is not legitimate on the BS-2 but is on the BS-2p. Therein, it will be fine for a
    BS-2p and isn't flagged as an error, but IS flagged as an error on a BS-2. There is no scratchpad string space on the BS-2.

    You might want to change the filetype from BSP to BS2 to avoid any future confusion, such as just occured. Although it's "legal" to call it anything you want, a filetype of BSP would imply that the target platform is the Stamp BS-2p. So too a filetype of BS2 implies the target platform is a Stamp BS-2.

    Regards,

    Bruce Bates
Sign In or Register to comment.