# fsVarsAircraftVarSet {{< callout context="note" title="NOTE" icon="outline/bulb" >}} Deprecated. Use `fsVarsAVarSet` instead. {{< /callout >}} The **fsVarsAircraftVarSet** function can be used to set the value of a specific SimVar.   ##### Syntax ``` wasm FsVarError fsVarsAircraftVarSet( FsSimVarId simvarId, FsUnitId unitId, FsVarParamArray param, double value ); ```   ##### Parameters {{< table-wrapper >}} | Parameters | Description | |------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| | `simvarId` | The ID of a simvar (found using `fsVarsGetAircraftVarId`). | | `unitId` | The ID of an unit (found using [fsVarsGetUnitId](fsvarsgetunitid/)). | | `param` | The parameter which might be mandatory to access the simvar (in case of an indexed simvar for instance). Elements in param can be FsCrc, String or index. | | `value` | The new value of the simvar. | {{< /table-wrapper >}}   ##### Return Values The function returns a `FsVarError`, 0 means there is no error.   ##### Example ``` wasm FsUnitId unitId = fsVarsGetUnitId("DEGREES"); FsSimVarId simvarId = fsVarsGetAircraftVarId("ATTITUDE INDICATOR PITCH DEGREES"); FsVarParamArray param = FsCreateParamArray("i", 0); double newValue = 123; if (fsVarsAircraftVarSet(simvarId, unitId, param, newValue) == FS_VAR_ERROR_NONE) { // valid } else { // error } ```