The online racing simulator
Display vehicle speed without fractions
Hello, I created a button that shows the vehicle speed, but it shows the speed in fractions. how can I do this in a fraction-free way?
For example, I want it to show 27 km/h instead of ̶2̶7̶.̶3̶8̶ km/h
I hope I made myself clear, thanks in advance
Attached images
Ekran Görüntüsü (1266).png
You can use the Round function.
The correct syntax is: Round(Var,2)

Var is the variable you want to be rounded.
2 is the value that sets the amount of decimals.
In your case the syntax should be: Round(Var,0)
Unfortunately, I could not understand what you said, could you explain a little more clearly?
He explained it already in a very detailed manner, but I'll give it a shot in layman's terms.

When you make your button, somewhere in the code you have to specify which value you want this button to display. So, instead of that value put Round(value, 0). The round function does exactly what you need, it takes the Var you input and rounds it up to the nearest integer, and returns the value.

A variable is a term in programming that is used for some quantities that are changing in real-time through various parts of the code, for short we just say Var and it can have many different types like integer, float and so on
Most likely what you say is probably due to translation is not understood, as far as I understand, I will try something and write
Thank you very much I was able to do what I wanted

FGED GREDG RDFGDR GSFDG