sizeof in multi-dimensional array - error?
#1

I have a multi-dimensional array looking like this..
Код:
new PedCategories[][][] = {
// male
{
    // asian
    {49,57,58...}
    // black
    {...}
    // hispanic
    {...}
    // white
    {...}
}
// female
{
    // asian
    {...}
    // black
    {...}
    // hispanic
    {...}
    // white
    {...}
}
I'm trying to access the skin IDs by first counting how many skins are in any array...
Код:
i = sizeof(PedCategories[male][black]);
Instead of compiling code to count how many black males there are, Pawno decided it would be easier to throw this error:
Код:
***.pwn(436) : error 001: expected token: "]", but found "-identifier-"
***.pwn(436) : warning 215: expression has no effect
***.pwn(436) : error 001: expected token: ";", but found "]"
***.pwn(436) : error 029: invalid expression, assumed zero
***.pwn(436) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Any reason for this?
Reply


Messages In This Thread
sizeof in multi-dimensional array - error? - by Deji - 22.01.2011, 18:05
Re: sizeof in multi-dimensional array - error? - by Steven Paul - 22.01.2011, 18:08
Re: sizeof in multi-dimensional array - error? - by Deji - 22.01.2011, 18:12
Re: sizeof in multi-dimensional array - error? - by Stylock - 22.01.2011, 18:49
Re: sizeof in multi-dimensional array - error? - by Deji - 22.01.2011, 18:56

Forum Jump:


Users browsing this thread: 5 Guest(s)