[Tutorial] Adding Variables...to strcats!
#3

Quote:
Originally Posted by HellSphinX
View Post
You could've done it with ONLY one string.

pawn Code:
new str[1024]; // guess this is enough for a too long text
format(str, sizeof(str), "Long text"); // here str = "LongText"
format(str, sizeof(str), "%s Another long text", str); // here str = "Long text Another long text"
format(str, sizeof(str), "%s Last long text", str); // here str = "Long text Another long text Last long text"
I agree this could have been another way, and thanks for the quick reply, but I took a more "newbie" approach and I would assume once you have enough experience, this could be a lot neater and shorter.

Thanks for the suggestion!
Reply


Messages In This Thread
Adding Variables...to strcats! - by HydraX - 21.08.2012, 00:51
Re: Adding Variables...to strcats! - by [KHK]Khalid - 21.08.2012, 00:59
Respuesta: Re: Adding Variables...to strcats! - by HydraX - 21.08.2012, 01:03

Forum Jump:


Users browsing this thread: 1 Guest(s)