03.01.2017, 23:07
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:
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.
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}
};
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.