🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

RegisterObjectType

Started by
2 comments, last by Zgred 16 years 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?
Advertisement
I think it might be because you're not registering the ADDREF & RELEASE callbacks via RegisterObjectBehaviour.
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