15.04.2015, 19:06
That is simply not possible. Strings are stored in arrays; each character is an index.
If you want an array of strings, you have to do something like this:
Then you could display the first string as 'strings[0]. But even then you can't use the assignment operator (x = y) to modify an array unless it is the same size. You'd have to use format().
pawn Код:
new string[6] = "Hello";
string[0] = 'H';
string[1] = 'e';
string[2] = 'l';
string[3] = 'l';
string[4] = 'o';
string[5] = 0; // Null terminator (can be represented with '\0')
pawn Код:
new strings[5][16] = { // 5 strings with UP TO 15 characters each (+1 for null terminator)
"example",
"example",
"example",
"example",
"example"
};