[BUG] %1.f dont work - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [BUG] %1.f dont work (
/showthread.php?tid=283730)
[BUG] %1.f dont work -
godknightx - 16.09.2011
Hi
new str[32], Float:example = 50.0;
format(str, 32, "Result: %1.f", example)
SendClientMessage(playerid, COLOR_WHITE, str);
Its print: "Result: 50.0000000"
Thank you for read.
Re: [BUG] %1.f dont work -
kacper55331 - 16.09.2011
%.1f ...
Re: [BUG] %1.f dont work -
Stepashka - 16.09.2011
pawn Код:
new str[32], Float:example = 50.0;
format(str, 32, "Result: %.1f", example)
SendClientMessage(playerid, COLOR_WHITE, str);
or no?
Re: [BUG] %1.f dont work -
=WoR=Varth - 16.09.2011
You want to remove the decimal?
%.0f
Re: [BUG] %1.f dont work -
=WoR=Varth - 16.09.2011
Quote:
Originally Posted by ******
As for the "1", that will make the part before the decimal point AT LEAST 1 character long (which it always is anyway).
|
Can you tell us more about them?
Re: [BUG] %1.f dont work -
godknightx - 16.09.2011
Oh, its my fault, sorry xD
Re: [BUG] %1.f dont work -
admantis - 17.09.2011
Quote:
Originally Posted by varthshenon
You want to remove the decimal?
%.0f
|
floatround
Re: [BUG] %1.f dont work -
=WoR=Varth - 17.09.2011
Quote:
Originally Posted by admantis
|
But what if he still want to keep the decimal ( Just don't want to show them)?
I know floatround.