How to insert %s on a format..
#1

I need to insert % (percentage) symbol in a format, but it doesn't show up..
I tryed this kinds of forms
pawn Код:
format(c_str, 64, "Compraste \'%'\%d de armadura por %d", chaleco, g_Armadura[playerid]);
and

pawn Код:
format(c_str, 64, "Compraste \%\%d de armadura por %d", chaleco, g_Armadura[playerid]);
But nothing.. thanks
Reply
#2

two %% ^^ wiki/format
Reply
#3

Yes, I readed the wiki, but another problem
pawn Код:
format(c_str, 64, "Compraste % %%i de armadura por $%d", chaleco, g_Armadura[playerid]);
Like that chaleco won't show...

pawn Код:
format(c_str, 64, "Compraste %%%i de armadura por $%d", chaleco, g_Armadura[playerid]);
And like that gives me chaleco value, but next to it there is a large number with an e at the end..
Reply
#4

pawn Код:
format(c_str, 64, "Compraste %%%0.0f de armadura por $%d", chaleco, g_Armadura[playerid]);
Try it
Reply
#5

pawn Код:
format(c_str, 64, "Compraste %s%d de armadura por %d", "%%", chaleco, g_Armadura[playerid]);
Reply
#6

Quote:
Originally Posted by -Sneaky-
Посмотреть сообщение
pawn Код:
format(c_str, 64, "Compraste %s%d de armadura por %d", "%%", chaleco, g_Armadura[playerid]);
Thanks

And thank all too
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)