function which has char* parameter...
If a fucntion has a char* parameter like this:
void print(const char* pMsg);
And I registed this function with description string:
void print(const string & in)
Then, the parameter cannot be passed correctly. How do you resolve this problem?
In this case you'll have to write a wrapper.
void print(const char *pMsg);void wrapper_for_print(const string &msg){ print(msg.c_str();}r = engine->RegisterGlobalFunction("void print(const string ∈)", asFUNCTION(wrapper_for_print), asCALL_CDECL); assert( r >= 0);
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement