I am trying to use lua in my game engine (but i thought id post it in c++ because it is not game programming related) I can get it to work except when Try and register an int(lua_State *L) that is in a class like
Class::int test(lua_State *L)
{
return 0;
}
it doesn't work
but when i do the int like this
int test(lua_State *L)
{
return 0;
}
it works but i cant access any of my variables in my class
my register code is in the same class and it looks like this:
lua_register(_luaMethods.get_state(), "test",test);
and i have tried this
lua_register(_luaMethods.get_state(), "test",TimerMethods::test);
Thanks
Dennis

New Topic/Question
Reply


MultiQuote







|