Home   Help Search Login Register  

Author Topic: format Q  (Read 821 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
format Q
« on: 05 Mar 2004, 20:43:27 »
Hello,

I'm working on a practice mission to test your marksmanship.
At the end of each test there are a lot of statistics like :

Number of shots
Accuracy
Missed targets
Average reactionspeed
...

Accuracy is calculated in percents (offcourse), but how can get  % character in a format line?

Here's a snippet...


_acc = _targetsdown *100 / _shots

Hint format ["Accuracy : %1%",_acc]


When _targetsdown = 14 and _shots = 16 , result is :


Accuracy : 87.5


I want :


Accuracy : 87.5%


If possible...  :P
« Last Edit: 05 Mar 2004, 20:49:28 by Blanco »
Search or search or search before you ask.

Unnamed

  • Guest
Re:format Q
« Reply #1 on: 05 Mar 2004, 20:49:01 »
Pass the percentage symbol as a string:

Code: [Select]
Hint Format ["%1 %2",10,"%"]

Offline Blanco

  • Former Staff
  • ****
Re:format Q
« Reply #2 on: 08 Mar 2004, 22:59:05 »
thx  8)
Search or search or search before you ask.