Guys can you please help
#4

Quote:
Originally Posted by Akeem
Посмотреть сообщение
that pawno isn't working, is there a way to edit that line into two lines?
Why isn't it working? Any errors? If it crashes while compiling you probably have an unhandled error in your script.

You need a buffer array to temporarily assemble the string.

Eg.

Код:
new text[500];
strcat(text, "Text 1 ...");
strcat(text, "Text 2 ...");
This will become "Text 1 ...Text 2 ...".

If you need to format the texts (like in this case) you should do it like this:

Код:
new text[500];
format(text, sizeof(text), "Text 1 %d %f", var1, var2);
format(text, sizeof(text), "%sText2 %d %f", text, var3, var4);
In the second line it will format the previous text into the beginning of the string.
Reply


Messages In This Thread
Guys can you please help - by Akeem - 21.02.2018, 22:45
Re: Guys can you please help - by NaS - 22.02.2018, 00:05
Re: Guys can you please help - by Akeem - 22.02.2018, 01:41
Re: Guys can you please help - by NaS - 22.02.2018, 02:05
Re: Guys can you please help - by Akeem - 22.02.2018, 02:27
Re: Guys can you please help - by NaS - 22.02.2018, 02:29
Re: Guys can you please help - by Akeem - 22.02.2018, 02:51

Forum Jump:


Users browsing this thread: 2 Guest(s)