Advertisement

RegisterObjectType

Started by June 14, 2008 09:43 AM
2 comments, last by Zgred 16 years, 8 months ago
Whenever I call RegisterObjectType it returns -5. It's independent of passed parameters. When I pass asOBJ_REF - RegisterObjectType("Info", sizeof(Info), asOBJ_REF) - it works, and only then. I am using samples/tutorial/source/main.cpp (AS 2.13.0) as a framework and RegisterObjectType is called at the end of ConfigureEngine. What's wrong?
I think it might be because you're not registering the ADDREF & RELEASE callbacks via RegisterObjectBehaviour.
Advertisement
I'm in a bit of a hurry right now, so I'm just going to refer you to the manual:

Registering a C++ class

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

What a shame.. I was truly certain that the "old" asOBJ_CLASS I found over the net was corresponding to the "new" asOBJ_APP_CLASS.. asOBJ_VALUE | asOBJ_POD | asOBJ_APP_PRIMITIVE is what I was looking for.

Well, next time I will look to the manual first ;)
Thank you a lot!

This topic is closed to new replies.

Advertisement