Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now
- - - - -

Something like printf in angelscript

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Ped Xing   Members   

122
Like
0Likes
Like

Posted 26 July 2004 - 11:32 AM

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.

#2 Andreas Jonsson   Moderators   

4629
Like
0Likes
Like

Posted 26 July 2004 - 02:50 PM

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

#3 Ped Xing   Members   

122
Like
0Likes
Like

Posted 26 July 2004 - 05:11 PM

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




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.