Array Not Initialised properly i think?
#1

I don't get that error, or any. however when i try printing something from this array it acts weird, here is the array.
pawn Код:
enum ARRAY_FORMAT
{  
    id,
    name[32],
    ids[9]
}
//Beach and Sea
new genBeachAndSea[][ARRAY_FORMAT] = {
    902, "Starfish", "[902]",
    903, "seaweed", "[903]",
    953, "CJ_OYSTER", "[953]",
    1461, "DYN_LIFE_P", "[1461]",
    1598, "beachball", "[1598]",
    1599, "fish1single", "[1599]",
    1600, "fish2single", "[1600]",
    1601, "fish3s", "[1601]",
    1602, "jellyfish", "[1602]",
    1603, "jellyfish01", "[1603]",
    1604, "fish3single", "[1604]",
    1605, "fish1s", "[1605]",
    1606, "fish2s", "[1606]",
    1607, "dolphin", "[1607]",
    1608, "shark", "[1608]",
    1609, "turtle", "[1609]",
    1610, "sandcastle1", "[1610]",
    1611, "sandcastle2", "[1611]",
    1637, "od_pat_hutb", "[1637]",
    1640, "beachtowel04", "[1640]",
    1641, "beachtowel03", "[1641]",
    1642, "beachtowel02", "[1642]",
    1643, "beachtowel01", "[1643]",
    2404, "CJ_SURF_BOARD", "[2404]",
    2405, "CJ_SURF_BOARD2", "[2405]",
    2406, "CJ_SURF_BOARD3", "[2406]",
    2410, "CJ_SURF_BOARD4", "[2410]",
    2782, "CJ_OYSTER_2", "[2782]"
};
there are about 40 more like this but i haven't tested them yet. when i try doing
pawn Код:
public message()
{
    print(genBeachAndSea[10][ids]);
    print(genBeachAndSea[5][ids]);
    return 1;
}
i get
Код:
[23:12:26] (null)
[23:12:26] (null)
in my log. and when i try doing
[pawn]
public message()
{
print(genBeachAndSea[0][name]);
print(genBeachAndSea[1][name]);
return 1;
}
[pawn]
i get
Код:
[23:12:07] (null)
[23:12:07] tarfish
i have spent the last 30 minutes debugging these arrays from misc formatting problems but i can't seem to get around this. Testing seems to show that doing arrayname[0][name] will return null, and arrayname[1][name] will return the name column of row 0. :/ could this be due to having large arrays or something?
Reply


Messages In This Thread
Array Not Initialised properly i think? - by dowster - 10.08.2011, 04:17
Re: Array Not Initialised properly i think? - by Kar - 10.08.2011, 04:34
Re: Array Not Initialised properly i think? - by Grim_ - 10.08.2011, 04:38
Re: Array Not Initialised properly i think? - by dowster - 10.08.2011, 04:38
Re: Array Not Initialised properly i think? - by dowster - 10.08.2011, 04:40

Forum Jump:


Users browsing this thread: 1 Guest(s)