three multi-dimensional: is it possibile?
#1

Hey guys, I'm working on a fishing sistem... Will this multi-dimensional can works?
pawn Код:
enum SFScale
{
    Name[62],
    cmMin,
    cmMax,
    Value
}
new ScaleFishStats[4][][SFScale] =
{
    {
        {"Acciuga", 13, 20, 1},
        {"Sparaglione", 13, 24, 1},
        {"Sardina", 20, 27, 1},
        {"Gт", 25, 30, 1},
        {"Pagello mafrone", 25, 36, 1},
        {"Sarago Testa Nera", 22, 45, 1},
        {"Sarago maggiore", 22, 45, 2},
        {"Anguilla", 35, 50, 2},
        {"Mormora", 30, 55, 2},
        {"Pagello fragolino", 25, 60, 1},
        {"Suro", 25, 60, 1},
        {"Sarago Pizzuto", 30, 60, 1},
        {"Sgombro", 30, 60, 1},
        {"Passera Pianuzza", 50, 60, 1},
        {"Occhialone", 30, 70, 2},
        {"Sogliola", 35, 70, 2},
        {"Orata", 35, 70, 2},
        {"Pagro mediterraneo", 35, 91, 1},
        {"Palamita", 50, 91, 2}
    },
    {
        {"Cefalo", 50, 100, 2},
        {"Spigola", 50, 103, 2},
        {"Cernia", 60, 120, 3},
        {"Tonnetto", 80, 122, 2},
        {"Merluzzo", 45, 140, 2}
    }, //Error line 59
    {
        {"Cernia di Fondale", 80, 210, 3},
        {"Tonno obeso", 180, 250, 3},
        {"Albacora", 150, 235, 3}
    },
    {
        {"Tonno rosso", 200, 450, 3},
        {"Pesce spada", 300, 455, 3}
    }
};
pawn Код:
forward RandomFishID(fishpole, &fishid, &lenght);
public RandomFishID(fishpole, &fishid, &lenght)
{
    switch(fishpole)
    {
        case 0: fishid = random(MAX_FISH_TYPE0);
        case 1: fishid = random(MAX_FISH_TYPE1);
        case 2: fishid = random(MAX_FISH_TYPE2);
        case 3: fishid = random(MAX_FISH_TYPE3);
    }

    lenght = random(ScaleFishStats[fishid][fishpole][cmMax] - ScaleFishStats[fishid][fishpole][cmMin]) + cmMin; //Error line 331
    return 1;
}
it gives me this error on compiling:
Код:
C:\Users\Vincenzo\Desktop\Test.pwn(59) : error 052: multi-dimensional arrays must be fully initialized
C:\Users\Vincenzo\Desktop\Test.pwn(331) : warning 213: tag mismatch
C:\Users\Vincenzo\Desktop\Test.pwn(331) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Messages In This Thread
three multi-dimensional: is it possibile? - by DarK_FeneR - 26.06.2016, 21:37
Re: three multi-dimensional: is it possibile? - by Konstantinos - 26.06.2016, 21:45
Re: three multi-dimensional: is it possibile? - by DarK_FeneR - 26.06.2016, 21:49
Re: three multi-dimensional: is it possibile? - by Konstantinos - 26.06.2016, 21:55
Re: three multi-dimensional: is it possibile? - by DarK_FeneR - 26.06.2016, 22:09

Forum Jump:


Users browsing this thread: 2 Guest(s)