Hi
I was using AS v. 1.10.1 WIP and have now upgraded to 1.10.1c. But now some registration code that used to work throws now an assert mzybe I'm still using something the wrong way?
Compilation works just fine but when I run an assertion is issued at this line:
r=engine->RegisterObjectBehaviour("Vector3",asBEHAVE_CONSTRUCT,"void initVector3(f32,f32,f32)",asFUNCTION4( Vector3Binding,void,initVector3,(f32,f32,f32,Vector3*) ),asCALL_CDECL_OBJLAST); assert( r >= 0 );
My Vector class has several constructors, overloaded operators, no destructor and many methods.
Maybe someone can give me a hint what has changed between 1.10.1 WIP1 and 1.10.1c?
Here's my registration code
r=engine->RegisterObjectType("Vector3",sizeof(Vector3),asOBJ_CLASS_CA);assert(r>=0);
r=engine->RegisterObjectProperty("Vector3","float x",offsetof(Vector3,x));assert(r>=0);
r=engine->RegisterObjectProperty("Vector3","float y",offsetof(Vector3,y));assert(r>=0);
r=engine->RegisterObjectProperty("Vector3","float z",offsetof(Vector3,z));assert(r>=0);
...
r=engine->RegisterObjectBehaviour("Vector3",asBEHAVE_CONSTRUCT,"void initVector3()",asFUNCTION4( Vector3Binding,void,initVector3,(Vector3*) ),asCALL_CDECL_OBJLAST); assert( r >= 0 );
r=engine->RegisterObjectBehaviour("Vector3",asBEHAVE_CONSTRUCT,"void initVector3(f32,f32,f32)",asFUNCTION4( Vector3Binding,void,initVector3,(f32,f32,f32,Vector3*) ),asCALL_CDECL_OBJLAST); assert( r >= 0 );
r=engine->RegisterObjectBehaviour("Vector3",asBEHAVE_CONSTRUCT,"void initVector3(const Vector3&)",asFUNCTION4( Vector3Binding,void,initVector3,(const Vector3&,Vector3*) ),asCALL_CDECL_OBJLAST); assert( r >= 0 );
r=engine->RegisterObjectBehaviour("Vector3",asBEHAVE_ASSIGNMENT,"Vector3& copyVector3(Vector3& o)",asFUNCTION4( Vector3Binding,Vector3,copyVector3,(Vector3&,Vector3&)),asCALL_CDECL_OBJLAST); assert( r >= 0 );
r=engine->RegisterGlobalBehaviour(asBEHAVE_ADD,"Vector3 addVector3(const Vector3& left, const Vector3& right)",asFUNCTION4( Vector3Binding,Vector3,addVector3,(const Vector3&,const Vector3&) ),asCALL_CDECL); assert( r >= 0 );
r=engine->RegisterGlobalBehaviour(asBEHAVE_SUBTRACT,"Vector3 subVector3(const Vector3& left, const Vector3& right)",asFUNCTION4( Vector3Binding,Vector3,subVector3,(const Vector3&,const Vector3&) ),asCALL_CDECL);assert( r >= 0 );
Thanks
Tom