FANDOM


Description

Run a pre-loaded script, loaded by DXScript::preLoadScript.

int DXScript::runPreLoadedScript(const char *_identifier)

Parameters

Type Name Description
const char* _identifier The identifier which will be used to identify the LUA script.




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();
// Pre-load a script to be executed later.
dxscr->preLoadScript("test_pre_load", "scripts/callToMainByFunc", "main");
// Run the pre-loaded script by providing its identifier.
dxscr->runPreLoadedScript("test_pre_load");