Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 wdl7770016   Members   -  Reputation: 104

Like
0Likes
Like

Posted 29 April 2013 - 05:29 AM

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



Sponsor:

#2 Jake Albano   Members   -  Reputation: 596

Like
0Likes
Like

Posted 29 April 2013 - 10:22 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS