How to insert %s on a format.. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to insert %s on a format.. (
/showthread.php?tid=180320)
How to insert %s on a format.. -
The_Moddler - 30.09.2010
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
Re: How to insert %s on a format.. -
Nero_3D - 30.09.2010
two %% ^^
wiki/format
Re: How to insert %s on a format.. -
The_Moddler - 30.09.2010
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..
Re: How to insert %s on a format.. -
MrDeath537 - 30.09.2010
pawn Код:
format(c_str, 64, "Compraste %%%0.0f de armadura por $%d", chaleco, g_Armadura[playerid]);
Try it
Re: How to insert %s on a format.. -
-Sneaky- - 30.09.2010
pawn Код:
format(c_str, 64, "Compraste %s%d de armadura por %d", "%%", chaleco, g_Armadura[playerid]);
Re: How to insert %s on a format.. -
The_Moddler - 30.09.2010
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