During a level, I keep track of the time spent in that level as a seconds counter (every 1 second, increase counter by 1). After the level, I want to display the time spent as a minutes:seconds counter.
This is what I'm doing:
Text = floor(seconds/60) & ":" & seconds%60
The problem is that a single-digit seconds value will display as one digit. Example: 1:3 instead of 1:03. How do I fix this?
EDIT: Figured it out! Wasn't too hard, even.
1. Set text to minutes and separator: floor(seconds/60) & ":"
2. If seconds < 10 (seconds%60 < 10), append "0"
3. Append seconds: seconds%60