Regular API function

simGetObjectAssociatedWithScript / sim.getObjectAssociatedWithScript

Description DEPRECATED. See sim.getObject('.') instead.
C/C++
synopsis
simInt simGetObjectAssociatedWithScript(simInt scriptHandle)
C/C++
parameters
scriptHandle: handle of the script
C/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 int objectHandle=sim.getObjectAssociatedWithScript (int 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).