Problem when passing a pointer to call_function.

Teto <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hello,

I'm facing a "assertion failed: crep && your are trying to use an
unregistered type" policy.hpp line 192" when I tried to call a Lua
function from C++. I've done many tests and the matter happens when I
try to pass "loader" as a parameter of the lua function.

================================
template<class T>
bool
AddLoader(ILoader<T>* loader,std::string extensions){
        luabind::object obj =
luabind::globals(CGameEngine::GetInstance()->mScript.mLuaState)["AddLoader"];
        if(!(obj && luabind::type(obj) == LUA_TFUNCTION)) {
            return false;
        }

        bool ok = luabind::call_function<bool>(obj,loader,extensions);
}
================================

i'm using luabind 8.* .

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.