Regular API function

simGetScriptHandle

Description Retrieves the handle of a script. The operation of this function depends on the current name suffix settings (see simGetNameSuffix, simSetNameSuffix, and the section on accessing general-type objects). A script doesn't directly have a name assigned, however if the script is a child script and associated with a scene object, then the script name is the name of the associated scene object. See also simIsHandleValid.
C synopsis simInt simGetScriptHandle(const simChar* scriptName)
C parameters
scriptName: name of the script
C return value
handle of the script if operation was successful, -1 otherwise
Lua synopsis number scriptHandle=simGetScriptHandle(string scriptName)
Lua parameters
Same as C-function. Alternatively, scriptName can be nil or inexistent, in which case the current script's handle is returned
Lua return values
Same as C-function

All regular API functions on one page