About mixed string - 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: About mixed string (
/showthread.php?tid=323415)
About mixed string -
DayaKisteme - 05.03.2012
Sorry my bad English i have question about strings...
My gamemode have only one string like this...
I use it and no problem, but /top10 command have second string like this...
Код:
new TopString[1024];
because i use this code...
Код:
format(TopString, sizeof(TopString), "%s"MAVI"%d. "GRI"%s "W"%s\n", TopString, ID, Nick, Score);
I can not use global String after use /top10 command, because String is mixed.
My question... can i use global String like this ?
Код:
format(String, sizeof(String), "%s"MAVI"%d. "GRI"%s "W"%s\n",String, ID, Nick, Score);
ShowPlayerDialog(... //
format(String, sizeof(String), " ");
Re: About mixed string - T0pAz - 05.03.2012
Yes you can.
Re: About mixed string -
Jefff - 05.03.2012
You must reset the string always if strcat or format is used like /top10
String = "";
//rest