03.01.2017, 22:55
Hi, I made 6 3d arrays for a dealership. Each array has vehicles from a certain category and their price. However if I try to compile the script, the compiler crashes.
Here are the arrays:
And this is where I use them (this is an example with g_OffRoad)
What's up?
Here are the arrays:
Код:
new g_OffRoad[][][] = { {"Landstalker", 50000}, {"Rancher", 65000}, {"Sandking", 80000}, {"Mesa", 45000}, {"Huntley", 100000} }; new g_Saloons[][][] = { {"Bravura", 25000}, {"Sentinel", 45000}, {"Manana", 20000}, {"Esperanto", 50000}, {"Washington", 75000}, {"Premier", 100000}, {"Previon", 30000}, {"Admiral", 40000}, {"Glendale", 50000}, {"Oceanic", 50000}, {"Hermes", 55000}, {"Virgo", 50000}, {"Greenwood", 60000}, {"Elegant", 75000}, {"Nebula", 35000}, {"Majestic", 65000}, {"Buccaneer", 35000}, {"Fortune", 70000}, {"Cadrona", 65000}, {"Willard", 45000}, {"Vincent", 55000}, {"Clover", 60000}, {"Bravura", 25000}, {"Intruder", 35000}, {"Primo", 30000}, {"Tampa", 30000}, {"Sunrise", 50000}, {"Merit", 75000}, {"Sultan", 250000}, {"Elegy", 200000}, {"Stafford", 80000}, {"Emperor", 35000} }; new g_SportVehicles[][][] = { {"Buffalo", 400000}, {"Cheetah", 750000}, {"Banshee", 800000}, {"Turismo", 1000000}, {"Sabre", 75000}, {"ZR-350", 300000}, {"Blista Compact", 80000}, {"Super GT", 500000}, {"Bullet", 1250000}, {"Uranus", 175000}, {"Jester", 150000}, {"Flash", 125000}, {"Euros", 100000}, {"Club", 75000}, {"Alpha", 100000}, {"Phoenix", 450000}, {"Bravura", 25000} }; new g_StationWagons[][][] = { {"Perenniel", 40000}, {"Moonbeam", 35000}, {"Solair", 45000}, {"Regina", 25000}, {"Stratum", 50000}, {"Bravura", 25000} }; new g_Convertibles[][][] = { {"Stallion", 65000}, {"Comet", 150000}, {"Feltzer", 75000}, {"Windsor", 65000}, {"Stallion", 65000} }; new g_Industrial[][][] = { {"Pony", 80000}, {"Bobcat", 65000}, {"Rumpo", 85000}, {"Stallion", 65000}, ("Berkley's RC Van", 100000), {"Walton", 30000}, {"Stallion", 65000}, {"Burrito", 80000}, {"Boxville", 100000}, {"Sadler", 50000}, {"Yosemite", 125000}, {"Stallion", 65000}, {"Picador", 40000}, {"Stallion", 65000} };
Код:
for (new i; i < sizeof(g_OffRoad); i++) { format(string, sizeof(string), "%s\t$%d\n", g_OffRoad[i][0], g_OffRoad[i][1]); strcat(dialog, string); } ShowPlayerDialog(playerid, DIALOG_OFF_ROAD, DIALOG_STYLE_LIST, "Off Road", dialog, "Select", "Back");