FANDOM


Description

Runs the specified LUA script from the specified function. Values returned from the script can be stored.

int DXScript::runScriptFunction(std::string _filePath, std::string _functionName, int _argc, float * _argv, int _expectedResults, double * _resultStorage)

Parameters

Type Name Description
std::string _filePath Path to the script file, without the file extension.
std::string _functionName Name of the function to be executed.
int _argc The number of arguments to pass to the function.
float* _argv Pointer to a list of arguments to pass to the script.
int _expectedResults The number of results expected to be returned from the script.
double* _resultStorage Storage space used for return values. This data is initialised in this function.





Returns

Zero for success, nonzero for failure. For more detail of a failure, this function returns a member of the eScriptReturns enumeration.

Example

DXScript *dxscr = new DXScript();
dxscr->runScriptFunction("scripts/callToMainByFunc", "main", 0);

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.