Regular API function

simRemoveScript / sim.removeScript

Description Removes a script. Not all script types can be removed, and it will also depend on whether simulation is running or not. See also sim.addScript.
C/C++
synopsis
simInt simRemoveScript(simInt scriptHandle)
C/C++
parameters
scriptHandle: handle of the script to remove or sim_handle_all to remove all scripts
C/C++
return value
-1 if operation was not successful
Lua synopsis sim.removeScript(int scriptHandle)
Lua parameters
Similar to the C-function counterpart. Additionally you can specify sim.handle_self to have the script remove itself.
Lua return values
Python synopsis sim.removeScript(int scriptHandle)