Results 1 to 2 of 2
  1. #1
    25+ Posting Member
    Join Date
    Feb 2009
    Location
    Brno
    Posts
    37
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    FSBUS syntax error in CDK

    Hello,
    I am trying to create some new project in FSBUS, but since I am not familiar with programming in the CDK, I tried to look in the samples that came with the program and even there I am having trouble. I opened the b4.fsp project and did not change anything, but when I try to start the program, I get a syntax error:

    syntax at 4,2: Syntax error [F, FFlaps, 0, 0x0be0, I32, 41, 16383, 6, 0, RW]

    and then it says Compiler aborted.

    The .ini file looks as follows:

    ' Flightsim Variables
    ' Name ID Offset Type Mul Div Interval Param Flags
    '-------------------------------------------------------------------------
    F, FFlaps, 0, 0x0be0, I32, 41, 16383, 6, 0, RW

    ' Cockpit Components
    'C Name Type CID RID FLAGS P1 P2
    '-------------------------------------------------------------------
    C, CRdFlaps, SWITCH, 28, 0, , 0, 0


    And the .dab file as follows:


    'EXAMPLE 6 b6.dab
    'DA 09/2006

    ' define fs interface variables by loading a config file
    ' show some values on testbuttons

    SUB OnBegin
    LoadConfigFile("b4.ini")
    Print ("please click on on Virtual-Controls and Button0 to show flaps state")
    Print ("Flightsim should run")
    END SUB

    SUB OnCRdFlaps
    if Value = 0
    then
    Print ("Flaps:" & Get("FFlaps"))
    end if
    END SUB


    Does anyone know what I am doing wrong and why I am getting these syntax errors?
    Thanks,

    Michal

  2. #2
    150+ Forum Groupie
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    227
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Hi Michal,

    Please send me the files you are using ( *dab, *.ini and *.fsp).
    I'll look at it tomorrow.


    Best regards

    Jan Geurtsen

Similar Threads

  1. USBKeys .ini syntax
    By Barrykensett in forum OpenCockpits General Discussion
    Replies: 1
    Last Post: 02-11-2010, 05:41 AM
  2. Fsbus ng io
    By Davral in forum I/O Interfacing Hardware and Software
    Replies: 0
    Last Post: 01-10-2009, 10:38 PM
  3. Fsbus 2.4.3
    By Anderson/SBSP in forum I/O Interfacing Hardware and Software
    Replies: 9
    Last Post: 11-30-2008, 04:25 PM
  4. Syntax question
    By RalphW in forum PMSystems
    Replies: 4
    Last Post: 01-27-2008, 06:43 AM
  5. Bit testing/setting syntax when we code pmSystems
    By David Rabiner in forum PM General Q & A
    Replies: 1
    Last Post: 01-07-2005, 08:38 AM