SWIG_NewPointerObj and values always being nil
- by Tom J Nowell
I'm using SWIG to wrap C++ objects for use in lua, and Im trying to pass data to a method in my lua script, but it always comes out as 'nil'
void CTestAI::UnitCreated(IUnit* unit){
lua_getglobal(L, "ai");
lua_getfield(L, -1, "UnitCreated");
swig_module_info *module = SWIG_GetModule( L );
swig_type_info *type = SWIG_TypeQueryModule(…