# fsVarsRegisterCustomSimVar {{< callout context="note" title="NOTE" icon="outline/bulb" >}} Deprecated. Use `fsVarsRegisterIVar, `[fsVarsRegisterOVar](fsvarsregisterovar/)` or `[fsVarsRegisterZVar](fsvarsregisterzvar/)instead. {{< /callout >}} The **fsVarsRegisterCustomSimVar** function can be used to create a new custom simulation variable.   ##### Syntax ``` wasm FsCustomSimVarId fsVarsRegisterCustomVar( const char* name, const char* componentPath, eFsSimCustomSimVarScope scope ); ```   ##### Parameters
ParametersDescription
name

The name of the new variable.

componentPathThe path of the component if relevant. nullptr otherwise The path format is : path:to:component or path:to:component@alias.The alias is not mandatory but is recommended for performance issue an to avoid conflicts.
scopeThe scope of the new custom simvar.
  ##### Return Values The function returns the right Id associated to the given name. If an error occurred, the function will return -1.   ##### Example ``` wasm FsCustomSimVarId varId = fsVarsRegisterCustomSimVar("TOTO", nullptr, FsSimCustomSimVarScopeSim); ```