Regular API function


Description Registers a script variable. Each time a script is run for the first time, registered variables will be set. See also simRegisterScriptCallbackFunction and simSetScriptVariable.
C synopsis simInt simRegisterScriptVariable(const simChar* varName,const simChar* varValue)
C parameters
varName: name of the variable
varValue: value of the variable. Can be NULL, in which case the value of the variable will be the top item of the provided stack.
stackHandle: a stack handle obtained with simCreateStack. Set to 0 if varValue is not NULL.
C return value
1 if the variable was registered, 0 if the variable was replaced because it already existed, -1 in case of an error
Lua synopsis -
Lua parameters
Lua return values

All regular API functions on one page