🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

bug?

Started by
1 comment, last by WitchLord 15 years, 7 months ago
Hi,

print(_String("abc")[0]);
or

print("abc"[0]);
failed to print correct char. but if you do this

_String a = "abc"; print(a[0]);
It will print correctly. The string is just contains a list of char. The index operator defines as:

	nRet = (asERetCodes) pScriptEngine->RegisterObjectBehaviour("_String", asBEHAVE_INDEX , "int8 &f(int)", asMETHODPR(_String, operator[], (int), char &), asCALL_THISCALL); 
	assert( nRet >= 0 );
Advertisement
I'll look into this. Thanks.

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 checked in the fix for this problem. Thanks for the help.

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