Jump to content
  • Advertisement
Sign in to follow this  
FDsagizi

There is no copy operator for the type 'Val' available.

This topic is 2172 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

Hi!smile.png

 

if i change this code ( Val &in ) 

 

r=en->RegisterObjectBehaviour("Val", asBEHAVE_CONSTRUCT,  "void f(const Val &in )",asFUNCTION(CopyConstructVal), asCALL_CDECL_OBJLAST); assert( r >= 0 );

 

to ( Val & )

 

r=en->RegisterObjectBehaviour("Val", asBEHAVE_CONSTRUCT,  "void f(const Val & )",asFUNCTION(CopyConstructVal), asCALL_CDECL_OBJLAST); assert( r >= 0 );

 

i have error: There is no copy operator for the type 'Val' available.

 

 

on this script code:

Val GetVal()
{
    Val ret = ...

    return ret; // error.
}

 

At revision: 1524

Edited by Andreas Jonsson

Share this post


Link to post
Share on other sites
Advertisement

Thanks. This is obviously something I need to correct. :)

 

How is Val registered? Is it an asOBJ_VALUE or asOBJ_REF? Do you use asEP_ALLOW_UNSAFE_REFERENCES?

Share this post


Link to post
Share on other sites

Val reg:

 

 

r=en->RegisterObjectType( "Val", sizeof(Val), asOBJ_VALUE | asOBJ_APP_CLASS_CDK ); assert( r >= 0 );
 
yes i use - asEP_ALLOW_UNSAFE_REFERENCES

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!