Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


- - - - -

Something like printf in angelscript


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   -  Reputation: 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.

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3452

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   -  Reputation: 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.



PARTNERS