Posts: 6,129
Threads: 36
Joined: Jan 2009
format() at any rate shouldn't crash your compiler, it should give you a warning.
If you format a string that is too long, you can always begin formatting again on another line and include the old formatted string, like so:
pawn Код:
new szTestString[128];
format(szTestString, sizeof(szTestString), "asfmdasflmkasflkmasflmkalkmsfalkmsfalkmsflmkas");
format(szTestString, sizeof(szTestString), "%s asfmdasflmkasflkmasflmkalkmsfalkmsfalkmsflmkas", szTestString);
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
You need to escape quotemarks by putting a backslash behind them. Also make sure the 'strings' array is large enough.
Posts: 1,469
Threads: 62
Joined: Jan 2010
Reputation:
0
It works perfect with less characters, but if I add 4 or more characteres , It won't compile and the compiler crash.
And "strings" is large enough, It will crash too if I put 500. I need something like strcat, but with it I can't format strings.