playMaker

Author Topic: How do I display a number lower than 10 as 00-09?  (Read 2105 times)

4ppleseed

  • Full Member
  • ***
  • Posts: 226
How do I display a number lower than 10 as 00-09?
« on: December 13, 2013, 04:20:05 PM »
I want to use an integer variable (or maybe a float) that when shown as text displays 00-99 but 0,1,2,3,4,5,6,7,8 & 9 are coming up on their own. Is there a way to make it show 00,01,02,03,04,05,06,07,08 and 09?

Thanks!

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: How do I display a number lower than 10 as 00-09?
« Reply #1 on: December 13, 2013, 07:15:32 PM »
just check if your value is lower than 10 and if its so add a "0" in front of your number string using "format string"- might do the trick :-)

cheers
Peter

uberwolfe

  • Junior Playmaker
  • **
  • Posts: 59
Re: How do I display a number lower than 10 as 00-09?
« Reply #2 on: December 13, 2013, 08:35:01 PM »
A good set of custom actions to do this and more can be found here:

http://hutonggames.com/playmakerforum/index.php?topic=267.0
« Last Edit: December 13, 2013, 08:44:50 PM by uberwolfe »