bm98
1
Version: SDK 1.2.0 2024
Frequency: Always
Severity: Annoyance
Similar MSFS 2020 issue: No
Context: WASM MSFS_Vars.h inconsistent with SDK documentation
Attachments: N/A, but can be provided upon request
Bug description:
The deployed MSFS_Vars.h defines a wrong or outdated call template for:
void fsVarsNamedVarGet(FsNamedVarId var, FsUnitId unit, double* result);
void fsVarsNamedVarSet(FsNamedVarId var, FsUnitId unit, double value);
The SDK Doc states:
FsVarError fsVarsNamedVarGet(FsSNamedId simvarId, FsUnitId unitId, double* result);
FsVarError fsVarsNamedVarSet(FsNamedVarId namedId, FsUnitId unitId, double value);
Not sure if Doc or file is correct.
Of course the header is correct. This should be filed as a docs bug. 
1 Like
Boris
3
Hello,
fsVarsNamedVarGet, will be fixed in the docs.
However, Iām not sure to see the typo in āfsVarsNamedVarSetā ?
Regards,
Boris
bm98
4
from SDK 1.2.2:
h file is a void function, SDK Doc says FsVarError as return type
same difference as the Get function
MSFS_Vars.h
void fsVarsNamedVarSet(FsNamedVarId var, FsUnitId unit, double value);
SDK Doc
FsVarError fsVarsNamedVarSet(
FsNamedVarId namedId,
FsUnitId unitId,
double value
);
Boris
5
My bad,
I got it (and updated the ticket).
Thank you 
Regards,
Boris
To answer your last question: the file is correct.
Best regards,
Eric / Asobo
1 Like
Boris
7
Hello,
This should be fixed in SU2 sdk documentation (currently in flighting).
Could you test and let us know if the issue is resolved on your end?
Regards,
Boris
bm98
8
well⦠the syntax of the call is fixed but the rest refers still to having a return value
fsVarsNamedVarSet
https://docs.flightsimulator.com/msfs2024/flighting/html/6_Programming_APIs/WASM/Vars_API/fsVarsNamedVarSet.htm
Return Values
The function returns a FsVarError
, 0 means there is no error.
Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES");
FsNamedVarId namedVarId = fsVarsRegisterNamedVar("TOTO");
double newValue = 123;
if (fsVarsNamedVarSet(namedVarId , unitId, newValue) == FS_VAR_ERROR_NONE)
{
// valid
}
else
{
// error
}
same for fsVarsNamedVarGet