About mixed string
#1

Sorry my bad English i have question about strings...

My gamemode have only one string like this...

Код:
new String[2048];
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), "  ");
Reply
#2

Yes you can.
Reply
#3

You must reset the string always if strcat or format is used like /top10
String = "";
//rest
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)