Regular API function

simGetObjectAssociatedWithScript

Description Retrives the handle of the object the script is attached to. See also simGetScriptAssociatedWithObject, simGetCustomizationScriptAssociatedWithObject and simAssociateScriptWithObject.
C synopsis simInt simGetObjectAssociatedWithScript(simInt scriptHandle)
C parameters
scriptHandle: handle of the script
C return value
Handle of the object that is associated with the script, or -1 if no object is associated with the script, or in case of an error.
Lua synopsis number objectHandle=simGetObjectAssociatedWithScript (number scriptHandle)
Lua parameters
scriptHandle: handle of the script, or sim_handle_self for the handle of the current script
Lua return values
objectHandle: handle of the object that the script is associated with, or -1 if the script is not associated (e.g. main scripts or add-ons don't have associated objects) or in case of an error.

All regular API functions on one page