PDA

View Full Version : Problems in source code



Timy
06-08-2005, 10:25 AM
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.

daviddrake
06-08-2005, 11:37 AM
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

Timy
06-08-2005, 12:34 PM
The error message was "exepcted a variable".

The part in error is this line:

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

Chris Savage
06-08-2005, 01:03 PM
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 (mailto:csavage@parallax.com)

Timy
06-08-2005, 01:39 PM
hi,

THe version of the stamp software i am using is BASIC Stamp Editor v2.2.

Timy
06-08-2005, 02:21 PM
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 Bates
06-08-2005, 02:47 PM
Timy -

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

retrieve_GPS1:
SERIN GPSpin, BaudMode,3000,No_GPS_Detected, [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