Jump to content
The simFlight Network Forums

Complie error in VB?


Recommended Posts

Hi!

I'm new at VB, so this probkem may be very easy. :D

But, what i'm trying to do is to get the numbers of engines at the aircraft.

But when i try to make the EXE or testdrive the program i get "Complie error: Expected: list separator or )"!

Private Sub Command1_Click()
Dim numbersOfEng As Long
Dim dwResult As Long
Call FSUIPC_Read(&0AEC, 2, VarPtr(numbersOfEng), dwResult)
Call FSUIPC_Process(dwResult)
lblnumbersOfEng.Caption = numbersOfEng
End Sub

It seems like it don't liek the "AEC" part in the FSUIPC_Read().

What to do about it?

Link to comment
Share on other sites

Change this:

FSUIPC_Read(&0AEC, 2, VarPtr(numbersOfEng), dwResult)

To this:

Call FSUIPC_Read(&H0AEC, 2, VarPtr(numbersOfEng), dwResult)

when you goto a new line or finish the "call" it will correct it to "&HAEC"

basiclly when entering "any" offset type &H in front of it... this will "auto" correct & remove the "0" in front if needed.....

Link to comment
Share on other sites

Change this:

FSUIPC_Read(&0AEC, 2, VarPtr(numbersOfEng), dwResult)

To this:

Call FSUIPC_Read(&H0AEC, 2, VarPtr(numbersOfEng), dwResult)

when you goto a new line or finish the "call" it will correct it to "&HAEC"

basiclly when entering "any" offset type &H in front of it... this will "auto" correct & remove the "0" in front if needed.....

Thank you very much! :D

Link to comment
Share on other sites

I'm new at VB, so this probkem may be very easy. :D

I don't know VB at all. sorry. Is the correct hexadecimal format "&0AEC" or "$0AEC", or even "&H0AEC"? Seems different in different reports. You need to check the VB reference manuals I think.

Pete

Thank you too! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.