API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

LUA_CALLMETA

Brew Release
Brew MP 1.0.2
See Also
Lua_GetMetaField(), ILua_PCall()
Description
Calls an objects metamethod, in protected mode. This assumes that the metamethod accepts only one input parameter, the object itself, and returns only one value.
Params
pif
[]:
a pointer to the ILua object
obj
[]:
the index of the object whose metamethod to call
event
[]:
the name of the metamethod to call
Prototype
  •    AEEResult Lua_CallMeta(ILua *pif, int obj, const char *event)
    
Return
  • AEE_SUCCESS: if the metamethod was found and successfully called, with its single return value pushed onto the stack, otherwise an error code.