[SOLVED] Can you display 2.00 instead of 2 when printing something to text object?

In short of it goes for decimals and for displaying minutes of time i bet same goes for seconds

Screenshot


On the left it displays current zoom level
It should be 0,20 but it is 0,2
IF i go to 2,00 it will display just 2
On the right you have time and as you see instead of 11:00 it displays 11: 0
Same will happen if it will be 11:04 it will display 11: 4

"Zoom Q/E - " + SubStr(ToString(GlobalVariable(SaveStuff.ZoomLVL)),0,4)
I use this to print zoom variable and substr ,0,4 determine how many digits to display
But again if number is full for example 2.00 it will display just 2
And 0 is cut out

I know i can cheat my way trough it with
Condition
Zoom variable = 2

Action
"Zoom Q/E - " + SubStr(ToString(GlobalVariable(SaveStuff.ZoomLVL)),0,4) + “.00”
And that will add that 2 extra 0

But is there way to force it to display it via expression? Maybe i am doing something wrong?
Or am i doom to add event for each possible full digit?

For time it isn’t so bad so far i cheat my way trough it with this

And it works

image

You need that 1st event there to display time properly when it is not 1 digit but 2
2nd event is for hour
3rd is for minutes

If you are always wanting 2 decimal places, the extended math support extension includes the “tofixedstring” expression which converts the number to text and to whatever decimal place you want.

4 Likes

Damn that is just perfect
Bless you Silver

1 Like