PDA

View Full Version : FSBUS syntax error in CDK



mnovak22
03-27-2009, 04:02 PM
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

Jan737
03-28-2009, 02:22 PM
Hi Michal,

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


Best regards

Jan Geurtsen