Warcraft III resources & community, 2003–2006 · archived

rounding off real variables

2 posts
#1

rounding off real variables

is there any way you can "cutt off" the .000 in real numbers? bcz i have a map where i convert a real number to a string and then i display that string into my leaderboard. problem is: i want it to show only 1,2,3,4,5,6,7,8 instead of 1.000,2.000,3.000,4.000,5.000,6.000,7.000,8.000 which it is showing now.

so anyone knows how i can get that .000 off that real variable?

i will place a link to my map here as well. jsut gimme a few minutes.
#2
Instead of using Real(<your variable>), use "conversion - convert real to integer". That will make the Real variable an integer value, and integer numbers cannot hold decimals.