The fsVarsIVarSet function can be used to set the value of a specific IVar.

Syntax
FsVarError fsVarsIVarSet(
    FsIVarId iVarId,
    FsUnitId unitId,
    double value,
    FsObjectId target
);
Parameters
ParametersDescription
iVarIdThe ID of an IVar (found using fsVarsGetIVarId or fsVarsRegisterIVar).
unitIdThe ID of a unit (found using fsVarsGetUnitId).
valueThe new value of the variable.
targetThe ID of the object on which the variable is being set. Default: FS_OBJECT_ID_USER_AIRCRAFT.
Return Values

The function returns FsVarError, where 0 means there is no error.

Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES");
FsIVarId iVarId = fsVarsRegisterIVar("Toto", "LIGHTING");
double value = 8;
if (fsVarsIVarSet(iVarId, unitId, value) == FS_VAR_ERROR_NONE)
{
    // valid
}
else
{
    // error
}

0/255