• Advertisement
Sign in to follow this  

Something like printf in angelscript

This topic is 4928 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement