[BUG] %1.f dont work
#1

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.
Reply
#2

%.1f ...
Reply
#3

pawn Код:
new str[32], Float:example = 50.0;
format(str, 32, "Result: %.1f", example)
SendClientMessage(playerid, COLOR_WHITE, str);
or no?
Reply
#4

You want to remove the decimal?
%.0f
Reply
#5

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?
Reply
#6

Oh, its my fault, sorry xD
Reply
#7

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
You want to remove the decimal?
%.0f
floatround
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)