Sign in to follow this  
B_old

Small question about ExecuteString and scriptstring vs. scriptstdstring

Recommended Posts

Hi, I just upgraded to version 2.18.1. Gets
int result = m_engine->ExecuteString(0, script, &m_defaultContext, asEXECSTRING_USE_MY_CONTEXT);
replaced by
int result = ExecuteString(m_engine, script, 0, m_defaultContext);
? No need to specify asEXECSTRING_USE_MY_CONTEXT anywhere? And what is the difference between scriptstring and scriptstdstring?

Share this post


Link to post
Share on other sites
Indeed. I changed the ExecuteString works when I moved it to a global function. There are no flags any more, which should make it a bit more straight forward.

If you pass in a context pointer to ExecuteString, it will be used by the function. If you do not, then it will create its own context internally.


The difference between scriptstrstring and scriptstring is that the former is the registration of the std::string as a value type, whereas the latter is the registration of a light wrapper of std::string which adds reference counting. Which is the best to use depends mostly only your own preference.

Share this post


Link to post
Share on other sites

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