Problem with integer nombers

For questions about using Classic.

Post » Sun Nov 14, 2010 4:11 pm

Hi!

How can I get in my program something like this:

Attack - Defence = Injures (Integer)
13 - 56% = [color=#008000:37c4yws7]6[/color:37c4yws7] (Integer up from no [color=#FF0000:37c4yws7]5.72[/color:37c4yws7])

or

Attack - Defence = Injures (Integer)
13 - 59% = [color=#008000:37c4yws7]5[/color:37c4yws7] (Integer down from value [color=#FF0000:37c4yws7]5.33[/color:37c4yws7])

I need only result like [u:37c4yws7]1,2,3[/u:37c4yws7] not [color=#FF0000:37c4yws7]3.42[/color:37c4yws7] or [color=#FF0000:37c4yws7]5.73[/color:37c4yws7]

Help

[url:37c4yws7]http://www.sendspace.pl/file/8f3546b7382e4212abc15f1[/url:37c4yws7]
blue round button {pobierz} means {download}

PLS help me
B
2
G
2
Posts: 2
Reputation: 654

Post » Sun Nov 14, 2010 4:22 pm

Try the expression round(x) to round x to the nearest integer.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests