I want to save a registered object ref type in my script class, but

Started by
0 comments, last by TechRogue 10 years, 12 months ago

the error report tell me : There is no copy operator for the type 'Entity' available.

What should I do? register a copy behaviour?but I don't find a Enum like asBEHAVE_COPY....

and mannual is no say how to do it....maybe just I not find it

help me -0 -please XD

Advertisement

How did you register the method that you're passing the entity to? My guess is that you did this:


engine->RegisterObjectMethod("type", "void method(Entity e)", asMETHOD(Type, method), asCALL_THISCALL);

and what you need to do is this:


engine->RegisterObjectMethod("type", "void method(Entity@ e)", asMETHOD(Type, method), asCALL_THISCALL);

Assuming your Entity is a reference type.

For the record, the manual page that involves copy operators is here.

This topic is closed to new replies.

Advertisement