How to get the usertype / class name in lua

Hi all,

I want to print the class name of an object in lua. I created a variable named pSprite which is a CCSprite in lua. I found that type(pSprite) only returns “usertype” but I want “CCSprite”. Any ideas?

Thanks in advance.

I think tolua.type() will do

Thanks a lot!