# fsVarsCustomSimVarSet {{< callout context="note" title="NOTE" icon="outline/bulb" >}} Deprecated. Use `fsVarsIVarSet, `[fsVarsOVarSet](fsvarsovarset/)` or `[fsVarsZVarSet](fsvarszvarset/)instead. {{< /callout >}} The **fsVarsCustomSimVarSet** function can be used to set the value of a specific CustomSImVar.   ##### Syntax ``` wasm FsVarError fsVarsCustomSimVarSet( FsCustomSimVarId varId, FsUnitId unitId, double value ); ```   ##### Parameters {{< table-wrapper >}} | Parameters | Description | |------------|-------------------------------------------------------------------------| | `varId` | The ID of a custom simvar. | | `unitId` | The ID of an unit (found using [fsVarsGetUnitId](fsvarsgetunitid/)). | | `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"); FsCustomSimVarId varId = fsVarsRegisterCustomSimVar("TOTO", nullptr, FsSimCustomSimVarScopeSim); double newValue = 123; if (fsVarsCustomSimVarSet(varId , unitId, newValue) == FS_VAR_ERROR_NONE) { // valid } else { // error } ```