The game score displays too many decimal points. How to limit it to whole numbers only?

My game score displays too many decimal points. How do I limit it to whole numbers only without any decimal points?

Hi, you could try the int function: int(Value/Variable).

1 Like

Hi…Thanks for the reply but I am really sorry I am not able to understand…Can you please elaborate?

I have seen

but still not able to understand. Do i need to edit json file?

When you are going to display the score do something like ToString(int(your_score_variable)) this is called casting an object.
Maybe the your_score_variable is a float or a string number so doing:

int(variable) you are casting any value of variable to be converted as an integer.
Hope this helps.


@UlisesFreitas is right. No need to edit the json.

1 Like

Thanks @UlisesFreitas @Drona
but i did it in a different way…I don’t know whether I am right or wrong?
I used “ceil” in action menu
change the global variable Coins = ceil(GlobalVariable(Coins))


1 Like

Is perfectly accepted to use ceil or floor depending on your needs.

1 Like