Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Enum vs Bool. Is there a difference ?

Featured Replies

When trying to establish what variables I need to be checking, In the script editor I put in a list of variables:

(A:GENERAL·ENG·FUEL·PUMP·ON,·Bool)·(A:GENERAL·ENG·FUEL·PUMP·SWITCH,·Bool)·(A:PITOT·HEAT·SWITCH,·Enum)·(A:FLAPS·HANDLE·INDEX,·Number)

Then I press TEST to see what 4 digits appear depending on what the switch state is in the sim. flicking the pitot switch changes the 3rd digit from 0 to 1. Changing the flap lever changes the 4th Digit from 0,1,2,3 but the first 2 digits always stay at 0 no matter what position the fuel pump switch is in.

The one difference between the Variables is that the PITOT is an "Enum", The FLAP HANDLE is "Number"  whilst the FUEL PUMP  variables are "Bool" . Should I be doing something different with Bool variables ? Or am I just looking at the wrong variables ?

When looking at the SDK Documentation  the 2 Fuel pump Variables have a red cross in the "Settable" column. Does that mean I can't use them ?

All testing is done on the Asobo C172 (G100)

 

 

 

Edited by Sybull
spelling and additional text

  • Commercial Member

Don't trust the MSFS SDK documentation when it comes to simvars, cross reference with P3D or FSX.

Most engine variables, like ...FUEL PUMP ON .., have an index, a designation for which engine you want to know this value.

(A:GENERAL ENG FUEL PUMP ON:1, Bool) should work better. :2, :3, :4 respectively, when you have more engines.

Also, don't get too hung up on the ", Unit" part. You can use different Units for the variables, the sim converts them internally. You can use ",Number" for anything. You can use ", Degrees" instead of ",Radians" if you want to convert it, etc. 

When a variable is marked "settable = no" then you cannot change it ("45 (>A:notsettablevar, number)" won't work). The variable is "read only".

Edited by Lorby_SI

LORBY-SI

  • Author

Bingo ! another piece of the puzzle. Will remember this. Makes sense when having more than one engine, so more than one of everything. . Thanks for that insight. Didn't think the Units for variables was a factor but it was the only thing I could see that was different. Many thanks for the assistance. Now I feel confident in getting this to work for me I will be buying the full version.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.