Sign in to follow this  

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

This topic is 1723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

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

This topic is 1723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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