SA-MP Forums Archive
2D array help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 2D array help (/showthread.php?tid=491241)



2D array help - erminpr0 - 29.01.2014

pawn Код:
enum aA {
2darray[32][128] //example.
};

static 2DARRAY[256][aA];

main() // example 3rd cell in first dimension.
{
    new aString[128];
    new index;
    while(index < 32)
    {
        // Nvm loading from file before printing or actually formating string(array)
        // In this case will be blank but it doesn't matter I just wanna now
        // If this will print actual string.
        format(aString, sizeof aString, "%s", 2DARRAY[3][2darray[index]]);
        printf(aString);
        ++index;
    }
}
If not please give me example.

2DARRAY[3][2darray][index] or 2dARRAY[3][2darray[index]] or ?


Re: 2D array help - ikey07 - 29.01.2014

I Believe you cant have 2D array in enum, as enum is 2D array itself in basic


Re: 2D array help - Excelize - 30.01.2014

That's right^.