Description
|
Retrieves a script's name based on its handle. A script doesn't have a name assigned, however if the script is a child script and associated with a scene object, then this function will retrieve the name of the associated scene object. If the script is not a child script or is not associated with a scene object, then the returned value is NULL
|
C synopsis
|
simChar* simGetScriptName(simInt scriptHandle) |
C parameters |
scriptHandle: handle of the script
|
C return value
|
buffer to the script's name if function was successful and the name is valid, NULL otherwise. The user is in charge of releasing the returned buffer with simReleaseBuffer
|
Lua synopsis
|
string scriptName=simGetScriptName(number scriptHandle)
|
Lua parameters |
scriptHandle: handle of the script, or sim_handle_self for the handle of the current script
|
Lua return values
|
scriptName: name of the script if associated with a scene object, empty string if the script is the main script, or the name of the add-on if the script is an add-on.
|