Regular API function

simSetScriptText / sim.setScriptText

Description Sets a new content for a script (i.e. attaches a new Lua code). During a simulation, the new script content might not be taken into consideration if a previous code was already executed at least once. See also simGetScriptText, sim.addScript and sim.associateScriptWithObject.
C synopsis simInt simSetScriptText(simInt scriptHandle,const simChar* scriptText)
C parameters
scriptHandle: handle of a script
scriptText: pointer to a script buffer (0-terminated buffer). This function will copy the buffer content, so that it can immediately be released after this call
C return value
-1 if operation was not successful
Lua synopsis sim.setScriptText(int scriptHandle,string scriptText)
Lua parameters
Similar to the C-function counterpart
Lua return values