Storing text data in a variable with an array
#4

Quote:
Originally Posted by Juvanii
View Post
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.
Reply


Messages In This Thread
Storing text data in a variable with an array - by Juvanii - 28.03.2015, 09:06
Re: Storing text data in a variable with an array - by ball - 28.03.2015, 09:08
Re: Storing text data in a variable with an array - by Juvanii - 28.03.2015, 09:14
Re: Storing text data in a variable with an array - by CalvinC - 28.03.2015, 10:12
Re: Storing text data in a variable with an array - by Juvanii - 28.03.2015, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)