lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello everyone!

Look, this works:

lua_pushstring(Script, filesDir);
lua_setglobal(Script, "FilesDirectory");

But this doesn't:

tolua_pushusertype(Script, WalkLayer, "Image");
lua_setglobal(Script, "WalkLayer");

I assumed tolua_pushusertype(...) was the toLua equivalent for lua_push*(...), but it seems I was wrong...

What's the right way to push a global of type 'Image' (binded to the script, of course)?

Thanks! ;-)