Regular API function

simGetScriptName / sim.getScriptName

Description Deprecated. See sim.getScriptStringParam or sim.getObjectAlias instead.
C/C++
synopsis
char* simGetScriptName(int scriptHandle)
C/C++
parameters
scriptHandle: handle of the script
C/C++
return value
buffer to the script's name if function was successful and the name is valid, nullptr otherwise. The user is in charge of releasing the returned buffer with simReleaseBuffer
Lua
synopsis
string scriptName=sim.getScriptName(int 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.