Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: ramandu on March 01, 2010, 06:26:23 PM

Title: joining strings
Post by: ramandu on March 01, 2010, 06:26:23 PM
how do we join strings with other strings, and strings with integers in pawn?

something like sprintf();

MyString[256] = "this is a test string";
MyInt = 1;

sprintf("%s %s %s %d \n", "this joins", MyString, "with", MyInt);

thankyou very much.
Title: Re: joining strings
Post by: Ettans on March 01, 2010, 06:48:51 PM
MyString[256] = "this is a test string";
MyInt = 1;

printf("this joins %s with %d\n",MyString,MyInt);


Output: this joins this is a teststring with 1
Title: Re: joining strings
Post by: Boss on March 01, 2010, 07:40:03 PM
http://tdhclan.ru/wiki/index.php/Printf
http://tdhclan.ru/wiki/index.php/Format