sortof an array inside an array?
#1

hi,

so, I was wondering if I can make something like:

pawn Код:
enum cpData
{
    Float:CP_X[ 20 ],
    Float:CP_Y[ 20 ],
    Float:CP_Z[ 20 ]
}
new Float:RaceCheckpoints[ 1 ][ cpData ] =
{
    { 10.001, 51.5123, 25.12312 }
};
it works fine, but how should I do it? I mean, CP_X[ 0 ] should be 10.001; CP_Y[ 0 ] should be 51.5123; and CP_Z[ 0 ] should be 25.12312;

then it should go on, on the same row, till CP_X/Y/Z[ 19 ];

for example.

{ 123, 456, 789, 123, 2345, 12315, 1234, 12352315, 35, 345, 123, 153125, 321431, 34132, 12341 ...> all the way to 19; }

like that in the array.

the problem is that it gives:

Код:
warning 227: more initiallers than enum fields
warning 213: tag mismatch
warning 227: more initiallers than enum fields
warning 213: tag mismatch
error 018: initialization data exceeds declared size
I'm not sure how to do this, excluding the fact of using CP1_X/Y/Z CP2_X/Y/Z etc, which I don't want to do unless there's no other option, because it looks terrible.
Reply


Messages In This Thread
sscanf problem - by Smileys - 27.01.2014, 17:35
Re: sortof an array inside an array? - by Misiur - 27.01.2014, 18:12
Re: sortof an array inside an array? - by Smileys - 27.01.2014, 18:25
Re: sortof an array inside an array? - by Misiur - 27.01.2014, 19:12
Re: sortof an array inside an array? - by Smileys - 27.01.2014, 19:46
Re: sortof an array inside an array? - by Misiur - 27.01.2014, 19:55
Re: sortof an array inside an array? - by Smileys - 27.01.2014, 20:00
Re: sortof an array inside an array? - by Misiur - 27.01.2014, 20:04
Re: sortof an array inside an array? - by Smileys - 27.01.2014, 20:05
Re: sortof an array inside an array? - by Misiur - 27.01.2014, 20:10

Forum Jump:


Users browsing this thread: 2 Guest(s)