Regular API function

simAddScript / sim.addScript

Description Inserts a new script. Use with care when simulation is running. See also sim.associateScriptWithObject.
C synopsis simInt simAddScript(simInt scriptType)
C parameters
scriptType: type of the script.
C return value
handle of the new script, or -1 in case of an error
Lua synopsis number scriptHandle=sim.addScript(number scriptType)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page