Quote:
Originally Posted by Juvanii
How to store text data in a variable with an array?
I tried to make this but didn't work!
pawn Code:
new text[15]; text[0] = "text1"; text[1] = "text2";
|
You can only store 1 bit of information in each cell of the array.
When using format, or text[15] = "string" it's practically just:
pawn Code:
text[0] = "s";
text[1] = "t";
text[2] = "r";
text[3] = "i";
text[4] = "n";
text[5] = "g";
text[6] = "";
The last character will be taken up by "null".
So you have to use ball's method, which works fine for me.
I don't think there's a problem in using it, even though it gives that result, unless your server crashes or something ofcourse.