How to round number?

For questions about using Classic.

Post » Thu Sep 22, 2011 2:27 pm

I'm working on the game and i've got question.

I'm working on Level system and i want to learn how to ROUND NUMBER!

This is --(Level.Value("Expience")/Level.Value("NextLVL"))

I don't want something like this: 25.13813981127412874%
but i want normal number like this 25%

Every level number is bigger.

Help ?
Sorry for my Enlish. I'm from Poland


B
4
G
1
Posts: 15
Reputation: 562

Post » Thu Sep 22, 2011 3:05 pm

The expression you are looking for is simply Round(value).

So round(25.13813981127412874) will indeed return 25.

You should take a close look at the following link:

System expressions
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests