Optional parameters can be added to extension-provided API functions by adding the "Optional" suffix to parameter names:
Quote:
// When defining/documenting API function parameters:
// - if a (char*,int) pair is encountered, name them buf, buf_sz
// - if a (const char*,int) pair is encountered, buf, buf_sz as well
// - if a lone basicType *, use varNameOut or varNameIn or
// varNameInOptional (if last parameter(s))
|
bool* myNameOptional works fine, and if the script does not omit the optional parameter, the IDE will only accept boolean input.
However, in the API help webpage and in the IDE inline help, the parameter type is named "unsupported":
Code:
Lua: identifier reaper.JS_Mouse_LoadCursorFromFile(string pathAndFilename, unsupported forceNewLoad)