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
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart

All regular API functions on one page