Jump to content

  • Log In with Google      Sign In   
  • Create Account


registering methods that take std::string with Angelscript

  • You cannot reply to this topic
No replies to this topic

#1 sorressean   Members   -  Reputation: 103

Like
0Likes
Like

Posted 16 August 2014 - 08:51 PM

Hello all:

I'm sorry for the bad formatting of this post. I am using a screen reader and this editor is really unaccessible/hard to use. I have the stdstring addon enabled and installed, and am trying to register a binding for the following method:

void BaseObject::SetName(const std::string& name)

here is how I am doing it, which is failing with a error of -10. Any ideas would be awesome.

    r=engine->RegisterObjectMethod("BaseObject", "void SetName(string& name)", asMETHOD(BaseObject, SetName), asCALL_THISCALL);
    assert(r >= 0);
I have tried a few variations of this and it is still failing. Any ideas would really be appreciated.

Thanks,



Sponsor:




PARTNERS