Something like printf in angelscript

Started by
1 comment, last by Ped Xing 19 years, 9 months ago
is there a way to achieve something like printf("blah %d", var); in angelscript (preferably using bstr)? How can I add numbers into a bstr in the script file? I tried bstr s = ""; s = bstrFormat(game.score); but that didn't work.
Advertisement
AngelScript doesn't support the ellipse operator (...) so a printf function cannot be registered or declared in the script. I have no plans to include support for this operator.

bstrFormat() should work unless you're using a data type for which I haven't implemented support yet. What error are you getting when you use bstrFormat()?

If I get the time tomorrow I'll run a few tests on bstrFormat() to see if I can find a problem.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

There is nothing wrong with bstr. I just had a few problems in my code and it's all working now. Using the bstrFormat will work fine for what I need.

thanks

This topic is closed to new replies.

Advertisement