Shop OBEX P1 Docs P2 Docs Learn Events
Expected Variable — Parallax Forums

Expected Variable

WORTHYgroupWORTHYgroup Posts: 1
edited 2012-08-08 10:26 in BASIC Stamp
My code just now started to have an "expected variable error." The puprle fonted "!" are what the debug highlights. I am new to this so please excuse my lack on knowledge.:) The code is below. I am trying to get transceivers to send GPS information to eachother.
Get_Info:
' SEROUT Sio, Baud, ["!GPS", GetInfo]
' SERIN Sio, Baud, 3000, No_Response, [ver_hw, ver_fw]
' PULSOUT TX, 1200 'Sync pulse for the receiver
' SEROUT TX, 16468, [ "!", ver_hw, ver_fw ]

SERIN Tx, 16468, [ "!", ver_hw, ver_fw ]
DEBUG MoveTo, FieldLen, 3, HEX ver_hw.HIGHNIB, ".", HEX ver_hw.LOWNIB
DEBUG MoveTo, FieldLen, 4, HEX ver_fw.HIGHNIB, ".", HEX ver_fw.LOWNIB
RETURN

If the whole code is needed please let me know:)
Thanks in advance for your help!:smile:

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-08-08 10:26
    First of all, purple is not a good choice for highlighting. It doesn't show up as well as you might think.

    The error message is correct. You can't have "!" in the input list for SERIN. You probably want to have WAIT("!") which is allowed. Look in the Stamp Manual in the chapter on SERIN for details.
Sign In or Register to comment.