30.09.2011, 17:01
I need to get how many numbers are in each row, they aren't all the same.
I want to be able to do 'sizeof(myArray[0])' and get 5, but I get:
All on this line:
So annoying. I must be mis-understanding how arrays work or something. What can I do to get around this?
pawn Code:
new myArray[][] = {
{1, 2, 3, 4, 5},
{1, 2, 3},
{6, 9},
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
};
Quote:
error 001: expected token: "]", but found "-integer value-" warning 215: expression has no effect error 001: expected token: ";", but found "]" error 029: invalid expression, assumed zero |
pawn Code:
new myVar = sizeof(myArray[0]);