Posts: 175
Threads: 3
Joined: Apr 2008
Reputation:
0
From what i can see it should work.
Posts: 175
Threads: 3
Joined: Apr 2008
Reputation:
0
I think what he put at the top was just an example.
Posts: 19
Threads: 7
Joined: Jul 2009
Reputation:
0
new tmp[128];
new float:temp = timechallange / 10;
format(tmp, sizeof tmp, "The timechallange record is %f Seconds, type /time to start a time challange!\n", temp);
print (tmp);
gTextDraw = TextDrawCreate(0.0, 380.0, tmp);
TextDrawUseBox(gTextDraw, 1);
returns:
The timechallange record is 0.000000 Seconds, type /time to start a time challange!
(if i put timechallange in the format instead of temp it just gives 2000.., so the var/int timechallange is reachable..)
Posts: 89
Threads: 0
Joined: Jul 2009
Reputation:
0
I pointed out your mistakes in my post, that you apparently totally ignored.
Posts: 2,856
Threads: 6
Joined: Jun 2007
Reputation:
0
No you cant remove the extra zero's, floats are always saved with 8 integers behind the comma
But you can denotes how much are shown within the format
%X.Yf
X = denotes how much integer should be before the comma
Y = denotes how much integer should be after the comma
Example
What you want: "%.1f Seconds"
Other Example: "%4.4f Seconds"