OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: JasonO on 24 May 2007, 18:00:43

Title: Timer script - Keeping minutes/seconds format
Post by: JasonO 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.
Title: Re: Timer script - Keeping minutes/seconds format
Post by: bedges 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.