Strings
I just tried AngelScript and I must admit that I like it, but there is one small problem :)
Angelscript
string str = "Some String";
void Update()
{
Print(str);
}
C++
engine->RegisterGlobalFunction("void Print(string &str)",asFUNCTION(PrintRef), asCALL_CDECL);
Now everytime I execute it, i get an error which points me here:
void asCScriptString::Release()
{
if( --refCount == 0 )
delete this;
}
if I change like this:
string str = "Some String";
void Update()
{
Print(str+""); // Print(str plus "")
}
It works perfectly. Any ideas?
It could be a bug in AngelScript. Which version of the library are you using?
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
I've fixed this bug now. If you're interested, you can get the bug fix from the SVN (rev 268).
Thanks for letting me know about the problem.
Regards,
Andreas
Thanks for letting me know about the problem.
Regards,
Andreas
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