Sign in to follow this  

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

Recommended Posts

wdl7770016    104

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

Share this post

Link to post
Share on other sites
TechRogue    722

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this