[luabind] How to pass a class arg to lua function
Brought to you by:
arvidn,
daniel_wallin
From: mos <mmo...@16...> - 2006-04-05 04:14:01
|
Hi! I use luabind bind class cChar and there is a lua script function like function Hello(cChar* p) p->Say('Hello') end --but how to pass the cChar to Hello in cpp file cChar* p; lua_getglobal(L,"Hello"); lua_pushlightuserdata(L, p); //there must be wrong. int error = lua_pcall(L, 1, 0,0); then luabind report error. What can I do ? Mos |