Regular API function

simGetScriptAttribute / sim.getScriptAttribute

Description Deprecated. See the functions related to script parameters instead.
C/C++
synopsis
int simGetScriptAttribute(int scriptHandle,int attributeID,double* floatVal,int* intOrBoolVal)
C/C++
parameters
scriptHandle: handle of a script
attributeID: the script attributeID
floatVal: pointer to a floating point value, receiving the floating point attribute (if applicable)
intOrBoolVal: pointer to an integer value, receiving the integer or bool attribute (if applicable)
C/C++
return value
-1 if operation was not successful
Lua
synopsis
number/bool attribute=sim.getScriptAttribute(int scriptHandle,int attributeID)
Lua
parameters
Similar to the C-function counterpart. Additionally, scriptHandle can be sim.handle_self to target the current script.
Lua
return values
attribute: the requested attribute value