I am using the game timer, but it is showing too many numbers, I only want to see the first 2 digits for example, 10 not 10.423423523423.
Is there a way I can customise this ?
I am using the game timer, but it is showing too many numbers, I only want to see the first 2 digits for example, 10 not 10.423423523423.
Is there a way I can customise this ?
you can floor it or cast it to an int before casting it to a string.
if you wanted a few decimals, lets say β10.39β, you could multiply it by 100, floor it, then divide it by 100. that would round it down to the hundredths place.
ah thank you βfloorβ
also can you do this to words too ? for example if you get a name and if you just want to show the first letter of their name, can you do that ?
The Substring function do that with String object.
thank you rxp, both perfect working answers