M.D. Array Size
#1

Hi There
I have a multi dimensional array containing enums... I wanted to build it like this...

pawn Код:
new rCMDs[][][cmds_r] =
    {
        // Common Commands
        {
                    {"/pm", "Chat Privately", "Usage: /pm <ID/Name> <Text>."},
                    {"/r", "Quickly Reply", "Usage: /r <Text>."},
                    {"/ej", "Eject You/Pasgr.", "Usage: /ej <Null/ID/Name/*>."},
                    {"/lk", "Lock Vehicle", "Usage: /lk."},
                    {"/gc", "Give Cash", "Usage: /gc <ID/Name> <Amount>."},
                    {"/p", "GPS Trace", "Usage: /p <Null/ID/Name>."},
            {"#", "Bubble Text", "Usage: #<Text>."},
        },
       
        // Civilian Commands
        {
                    {"/pk", "Pickpocket", "Usage: /pk <Null/ID/Name>."},
        },
       
        ...
    };
But we all know that Multi-Dimensional Arrays Should Be Fully Initialized.
So I decided to fill out the remaining blocks with {"\0"}
Now, how can I get the size of sub-arrays, like rCMDs[0] : 7 or rCMDs[1] : 1.
... And It's clear that sizeof cannot be used...

anyone help?
Reply


Messages In This Thread
M.D. Array Size - by AnnaSB - 10.02.2015, 08:14

Forum Jump:


Users browsing this thread: 2 Guest(s)