fsVarsRegisterZVar
The fsVarsRegisterZVar function can be used to get or create a ZVar (which is the same as an L:1 variable).
Syntax
FsZVarId fsVarsRegisterZVar(
const char* name,
FsObjectId target
);
Parameters
| Parameters | Description |
|---|---|
name |
The name of the (new) variable. |
target |
The ID of the object from which the variable is being retrieved. Possible targets are:
Default: |
Return Values
The function returns the ID associated with the given variable name. If the given name has already been registered, the function will return the ID of the existing ZVar. If an error occurred, the function will return FS_VAR_INVALID_ID.
Remarks
ZVar are variables local to a specific SimObject (if there are multiple instances of the object, each one will have its own unique variable).
Example
FsZVarId zVarId = fsVarsRegisterZVar("TOTO");
Related Topics