DXScript::addCFunction

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


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"));