L:var "Number" vs "number"

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Post Reply
Message
Author
Toddimus
Posts: 39
Joined: Wed Feb 17, 2021 6:01 pm

L:var "Number" vs "number"

#1 Post by Toddimus »

I'm still on the 4.1.6 version but I suspect this will still be an issue in v4.2 onward. In working with the Black Square TBM 850, I found that this works:

Code: Select all

fs2020_variable_write("L:var_850Mode", "Number", 1)
And this doesn't work reliably:

Code: Select all

fs2020_variable_write("L:var_850Mode", "number", 1)
The simple capital "N" vs lower case "n" makes all the difference in the world. It's as if the version with the "number" does somewhat work but it is immediately reset to its old value. Adding multiple writes has no effect. But if I change it to the line with "Number", it works the first time and without having to write multiple times.

The weird part is that in many other instances, with other L:vars, the "Number" vs "number" doesn't make a difference. I looked through the files of the TBM to see if there was a correlation and I couldn't find any. He uses both "Number" and "number" interchangeably. So that leads me to believe it's something to do with Air Manager. But why it works sometimes and not others is what has me scratching my head. Hopefully this gives you something to work with though. Maybe somewhere deep inside a case statement, capital vs lower case are treated differently.
Simstrumentation Instrument developer
Check us out http://www.simstrumentation.com or https://github.com/Simstrumentation/Air-Manager

User avatar
Ralph
Posts: 8357
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: L:var "Number" vs "number"

#2 Post by Ralph »

The unit is sent to the sim as is, so it depends on what the aircraft developer expects or does with it.

Toddimus
Posts: 39
Joined: Wed Feb 17, 2021 6:01 pm

Re: L:var "Number" vs "number"

#3 Post by Toddimus »

Thanks for the reply. That's interesting. If that's the case then I don't see why it's behaving that way. I wonder if it is something in the way MSFS processes the queries/writes then.

At least now I know to try capital vs lower case if something isn't working as expected.
Simstrumentation Instrument developer
Check us out http://www.simstrumentation.com or https://github.com/Simstrumentation/Air-Manager

User avatar
Ralph
Posts: 8357
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: L:var "Number" vs "number"

#4 Post by Ralph »

It might be dependent on the aircraft developer, but I do not know for sure.

Post Reply