04.01.2017, 15:45
Quote:
Your method is also bad because the compiler won't know exactly what you are doing. There won't be any error/warning in case you do anything with no logic. Example:
pawn Код:
pawn Код:
|
That's also why the size of enumerators with elements that have more than one cell are always larger than the actual number of columns (counting by 1).
And the reason behind doing enum_name:1, enum_name:2, etc. in the index where the enumerator was placed when declaring the array as an alternative to not use the name of the elements in the enumerator.
I was only explaining to the thread author regarding to why a 3rd dimension isn't needed. But I get where you are coming from since I used 'column', it technically defines the column if you insert the right index, but I guess I could have used 'cell' instead.
-----
I'm not sure what method you are talking about, but this is the most common one:
pawn Код:
enum e_array
{
string[144],
integer
};
new array[][e_array] =
{
{"hello buddy", 5000},
{"something", 2000}
};
main()
{
printf("%s %d", array[0][string], array[0][integer]);
}