[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Getting custom-type global from Lua?
- From: L-28C <kixdemp@...>
- Date: Sat, 04 Aug 2007 22:21:50 -0400
Hello people of Lua town... or list, same thing. :-)
I'm using this function to retrieve Lua global 'BottomLayer' of type
'Image'. I try it but it returns a null pointer:
Image *Map::GetBottomLayer()
{
lua_getglobal(Script, "BottomLayer");
return (Image*)tolua_tousertype(Script, 1, 0);
}
I just grabbed the tolua_tousertype from the toLua binding of the Image
class. I Googled a bit and the arguments seem alright... What am I doing
wrong?
Thanks in advance!