• Advertisement
Sign in to follow this  

registering methods that take std::string with Angelscript

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

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,

Share this post


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

  • Advertisement