Vice City Multiplayer

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

Title: joining strings
Post by: ramandu on March 01, 2010, 08: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, 08:48:51 pm
Code: [Select]
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, 09:40:03 pm
http://tdhclan.ru/wiki/index.php/Printf
http://tdhclan.ru/wiki/index.php/Format