MobiFlight-WASM-Module icon indicating copy to clipboard operation
MobiFlight-WASM-Module copied to clipboard

Example of setting variables isn't quite right

Open gbrail opened this issue 3 years ago • 0 comments

The README indicates that we can use the module to set a variable using the following syntax:

MF.SimVars.Set(5 (>L:MyVar))

It claims that the calculator code "5 (>L:MyVar)" will be executed.

However, reading the code and testing this out, it appears that the correct syntax is actually:

MF.SimVars.Set.5 (>L:MyVar)

This will execute everything after "Set." using execute_calculator_code.

Thanks for open-sourcing this module. When I get a chance I'll open a PR!

gbrail avatar Sep 30 '22 04:09 gbrail