Home   Help Search Login Register  

Author Topic: Timer script - Keeping minutes/seconds format  (Read 951 times)

0 Members and 1 Guest are viewing this topic.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Timer script - Keeping minutes/seconds format
« on: 24 May 2007, 18:00:43 »
Hey

I have a basic timer script that loops through 60 seconds, then adds a minute and starts over again. However when I display the seconds and minutes, the result is like '0:1' instead of '0:01'

I understand that this is because of the variable format (being a number) and it would need to be a string to keep the two zero's.. however if it's a string I can not treat it like a number and simply add to it.

How would I keep the 2 digit seconds number?

Thanks.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Timer script - Keeping minutes/seconds format
« Reply #1 on: 24 May 2007, 18:09:55 »
display two numeric variables next to each other, x:yz. if z>9, y = y + 1; z=0. repeat.