3d array
#2

You can't create 3D array directly (also, the prices wouldn't require another dimension, as the string does). You have to do it like this:
pawn Код:
enum e_Convertibles
{
    g_C_Name[16],
    g_C_Price,
};

new g_Convertibles[][e_Convertibles] =
{
    {"Stallion", 65000},
    {"Comet", 150000},
    {"Feltzer", 75000},
    {"Windsor", 65000},
    {"Stallion", 65000}
};
Accessing: g_Convertibles[i][g_C_Name] .

By the way, I recommend you to create only one array with all those vehicles, by also specifying an enum item for the type, and when looping you should check the type to show it or not.
Reply


Messages In This Thread
3d array - by GoldenLion - 03.01.2017, 22:55
Re: 3d array - by IstuntmanI - 03.01.2017, 23:07
Re: 3d array - by GoldenLion - 03.01.2017, 23:37
Re: 3d array - by SickAttack - 04.01.2017, 00:01
Re: 3d array - by GoldenLion - 04.01.2017, 00:47
Re: 3d array - by IstuntmanI - 04.01.2017, 01:23
Re: 3d array - by GoldenLion - 04.01.2017, 01:52
Re: 3d array - by SickAttack - 04.01.2017, 15:45
Re: 3d array - by GoldenLion - 04.01.2017, 16:21

Forum Jump:


Users browsing this thread: 1 Guest(s)