RegisterObjectBehaviour("cVector3f", asBEHAVE_ADD, "cVector3f f(const cVector3f& in) const", asMETHODPR(cVector3f, operator+, (const cVector3f&) const, cVector3f), asCALL_THISCALL);
🎉 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!
Problem with overloading Object-operator
Hello,
when I do this:
I get an "Invalid configuration" error. (No details)
I believe that I registered the object correctly, as I allready successfully registered some of its methods.
Any ideas?
RegisterObjectType("cVector3f", sizeof(cVector3f), asOBJ_CLASS);//...//This works!RegisterObjectMethod("cVector3f", "float Dot(cVector3f& in)", asMETHOD(cVector3f, Dot), asCALL_THISCALL);//More methods...//No behaviours, except for the operator that does not work
I know what it is.
You're trying to register the behaviour asBEHAVE_ADD as an object behaviour, but AngelScript doesn't support this yet. AngelScript only supports global behaviours for these operators, so you'll have to write a global function instead.
I'll have to modify AngelScript to give a better explanation for this.
You're trying to register the behaviour asBEHAVE_ADD as an object behaviour, but AngelScript doesn't support this yet. AngelScript only supports global behaviours for these operators, so you'll have to write a global function instead.
I'll have to modify AngelScript to give a better explanation for this.
Yes, I have plans for this, though it will be awhile.
It seems that I'm saying that a lot lately. I wish I had more time to work on AngelScript. There is so much I want to do with it, but with so few hours to work it unfortunately takes a long time for features to be implemented. It's been 3 years since I first started working on AngelScript, and I still have a long way to go for the library to be feature complete.
Anyway, keep those suggestions coming. It's the feedback from you guys that keeps me going on this project.
It seems that I'm saying that a lot lately. I wish I had more time to work on AngelScript. There is so much I want to do with it, but with so few hours to work it unfortunately takes a long time for features to be implemented. It's been 3 years since I first started working on AngelScript, and I still have a long way to go for the library to be feature complete.
Anyway, keep those suggestions coming. It's the feedback from you guys that keeps me going on this project.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement