Vector3 getVector() { Vector3 v; v.x=1; v.y=2; v.z=3; return v; }the vector class is registered like this:

class Vector3 { public : inline Vector3(){} inline Vector3( f32 fX, f32 fY, f32 fZ ) : x( fX ), y( fY ), z( fZ ){} float x,y,z; } //registration r=engine->RegisterObjectType("Vector3",sizeof(Vector3),asOBJ_CLASS_CDA);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);when i call context-Execute() my app bails out with an access violation error. I can use the Vector class in script methods without any problems even constructors work like a charm. The only exception is that i can't return them. any ideas what might cause that? regards Tom