new VehNames[211][] = { "Landstalker","Bravura","Buffalo","Linerunner","Pe ren","Sentinel","Dumper","Firetruck","Truck","Stre tch", "Manana","Infernus","Voodoo","Pony","Mule","Cheeta h","Ambulance","Leviathan","Moonbeam","Esperant"," Taxi", "Washington","Bobcat","Mr. Whoopee","BF-Injection","Hunter","Premier","Enforcer","Securica ","Banshee", "Predator","Bus","Rhino","Barracks","Hotknife","Ar tict-1","Previon","Coach","Cabbie","Stallion","Rumpo ", "RC-Bandit","Romero","Packer","Monster","Admiral","Squ alo","Seasparrow","Pizzaboy","Tram","Artict-2","Turismo", "Speeder","Reefer","Tropic","Flatbed","Yankee","Ca ddy","Solair","Topfun","Skimmer","PCJ600","Faggio" ,"Freeway", "RC-Baron","RC-Raider","Glendale","Oceanic","Sanchez","Sparrow"," Patriot","Quad","Coastguard","Dinghy","Hermes", "Sabre""Rustler","ZR350","Walton","Regina","Comet" ,"BMX","Buritto","Camper","Marquis","Baggage","Doz er","Maverick", "VCN-Maverick","Rancher","FBI-Rancher","Virgo","Greenwood","Jetmax","Hotring","S andking","Blistac Compact", "Police Maverick","Benson","Mesa","RC-Goblin","Hotring-A","Hotring-B","Bloodring Banger","Rancher Lure", "SuperGT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropduster","Stunt","Petro","Nebul a", "Majestic","Buccanee","Shamal","Hydra","FRC-900","NRG-500","Copbike","Cement","Towtruck","Fortune", "Candrona","FBI-Truck","Willard","Forklift","Tractor","Combine","F eltzer","Remington","Slamvan", "Blade","Freight","Streak","Vortex","Vincent","Bul let","Clover","Sadler","Firetruck","Hustler", "Intruder","Primo","Cargobob","Tampa","Sunrise","M erit","Utility","Nevada","Yosemite","Windsor", "Monster-A","Monster-B","Uranus","Jester","Sultan","Stratum","Elegy","R aindance","RC-Tiger", "Flash","Tahoma","Savanna","Bandito","Freiflat","S treak-Car","Kart","Mower","Duneride","Sweeper", "Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Petrot", "Emperor","Wayfarer","Euros","Hotdog","Club","Frei box","Artict-3","Andromada","Dodo","RC-Cam", "Launch","Copcar-LS","Copcar-SF","Copcar-LV","Copcar-Desert","Picador","Swatvan","Alpha","Phoenix", "Glendale","Sadler","Bagbox-A","Bagbox-B","Tugstairs","Boxburg","Farm-Trailer","Utility-Trailer" }; GetVehicleName(vehicleid) { return VehNames[GetVehicleModel(vehicleid)-400][0]; } |
(23) : error 052: multi-dimensional arrays must be fully initialized |
printf(" sizeof: %d", sizeof(VehNames));
The listed vehname 209 not 211!
Try: pawn Code:
|
new VehNames[][] =
{
...,...,..
//etc
};
#define GetVehicleName(%0) \
VehNames[GetVehicleModel(%0)-400]
new VehNames[][24] = // Set return string array 24
{
...,...,...
//etc
};
stock
GetVehicleName(vehicleid)
return VehNames[GetVehicleModel(vehicleid)];
new VehNames[][] = // Not set return string array
{
...,...,...
//etc
};
stock
GetVehicleName(vehicleid)
return VehNames[GetVehicleModel(vehicleid)];