Regular API function

sim.registerScriptFunction

Description
Registers a script function for auto-completion, syntax highlighting and call-tip display (in the CoppeliaSim internal code editor). Useful for script function definitions inside of a Lua file, loaded by a plugin.
C synopsis
See simRegisterScriptCallbackFunction instead that allows to register C/C++ function callbacks
C parameters
-
C return value
-
Lua synopsis
int result=sim.registerScriptFunction(string funcNameAtPluginName,string callTips)
Lua parameters
functNameAtPluginName: name of the function, combined with the plugin name it is associated with: functionName@pluginName. Avoid using too simple function names, otherwise they might clash with other plugins. Also, always use the simXX. prefix (e.g. simMyPlugin.myCustomFunction) for the function name. The plugin name should be the exact same name used while loading the plugin via simLoadModule (if the plugin name is simExtMyPlugin.dll, this should be MyPlugin).
callTips: call tips: string (or several strings separated by '@') that indicates the input/output argument type/size. Call tips appear in the script editor when the function was typed followed by "(".
Lua return values
result: 1 if function was registered or 0 if function was replaced (when that function name already existed)