[Help] - Combining Strcat using Format -
SAMProductions - 23.05.2014
Is that possible that i can combine 2 Strcat(s) using Format because my strings length can't handle it anymore, like for example:
Код:
strcat(string1, "Message 1\n\n");
strcat(string2, "Message 2");
format(combiner, sizeof(combiner), "%s%s", string1, string2);
Thanks in Advance
Re: [Help] - Combining Strcat using Format -
NaClchemistryK - 23.05.2014
Yes, you can. As long as there is something stored in string1 and string2.
Re : [Help] - Combining Strcat using Format -
S4t3K - 23.05.2014
Yes, you can.
Re: [Help] - Combining Strcat using Format -
SAMProductions - 23.05.2014
But whenever i combined the strings, it doesn't complete the Messages.
EDIT :-
and I used "
new string[2048];", can i change "
[2048]" to something bigger or what ?
Re: [Help] - Combining Strcat using Format -
NaClchemistryK - 23.05.2014
There is a limit of the amount of characters you can store in a string. Make sure you don't exceed that.
I think the limit was 1024.
If the message exceeds the max amount your string can hold, increase it.
Re: [Help] - Combining Strcat using Format -
SAMProductions - 23.05.2014
Well,
Quote:
Originally Posted by SAMProductions
But whenever i combined the strings, it doesn't complete the Messages.
|
Re : [Help] - Combining Strcat using Format -
S4t3K - 23.05.2014
The pawn compiler doesn't have any limit. I already compiled a string with almost 2600 chars (for a register system, which sends a mail if forgotten password).
What string isn't complete ? Message1, Message2, or combiner ?
Re: [Help] - Combining Strcat using Format -
NaClchemistryK - 23.05.2014
@ the code you've shown
If the string "combine" can't hold the amount of characters of string1 and string2 added, it won't display all of it. Example:
pawn Код:
new strin1[100];
new string2[100];
new combine [150];
That will only show 3/4 of the message. Why? Cause "combine" can only hold 150 characters, and not 200.
EDIT:: sorry for saying something wrong, I thought it had a limit. Pardon me.
Re: [Help] - Combining Strcat using Format -
SAMProductions - 23.05.2014
Quote:
Originally Posted by ******
Youcan, or you could just use "strcat"...
|
Help about this,
Quote:
Originally Posted by SAMProductions
But whenever i combined the strings, it doesn't complete the Messages.
|
EDIT :-
Anyway, Thanks for the Details