FANDOM


Description

Register a C function which can be called from LUA, with LUA. A pointer to the function and its identifier are also stored in a table for future reference.

int DXScript::addCFunction(const char *_identifier, lua_CFunction _cFunction)

Parameters

Type Name Description
const char* _identifier The identifier (the function name) which will be used in a LUA script.
lua_CFunction _cFunction A function pointer to a C function which can be called from a LUA script. This function should be stored in the DXScriptFunction class.

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();
DXScriptFunction *dxscrf = new DXScriptFunction (dxscr);
dxscr->addCFunction("callC", dxscrf->getFromCallTable("callC"));

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.