Guest User

Compiler bugs

a guest
Apr 21st, 2014
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.22 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. static const VehicleNames[212][] =
  4. {
  5.     "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perennial", "Sentinel",
  6.     "Dumper", "Firetruck" , "Trashmaster" , "Stretch", "Manana", "Infernus",
  7.     "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  8.     "Esperanto", "Taxi", "Washington", "Bobcat", "Mr Whoopee", "BF Injection",
  9.     "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
  10.     "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
  11.     "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
  12.     "Squallo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
  13.     "Reefer", "Tropic", "Flatbed","Yankee", "Caddy", "Solair","Berkley's RC Van",
  14.     "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron","RC Raider","Glendale",
  15.     "Oceanic", "Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
  16.     "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
  17.     "Burrito", "Camper", "Marquis", "Baggage", "Dozer","Maverick","News Chopper",
  18.     "Rancher", "FBI Rancher", "Virgo", "Greenwood","Jetmax","Hotring","Sandking",
  19.     "Blista Compact", "Police Maverick", "Boxville", "Benson","Mesa","RC Goblin",
  20.     "Hotring Racer", "Hotring Racer", "Bloodring Banger", "Rancher", "Super GT",
  21.     "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stuntplane",
  22.     "Tanker", "RoadTrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
  23.     "FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona",
  24.     "FBI Truck", "Willard", "Forklift","Tractor","Combine","Feltzer","Remington",
  25.     "Slamvan", "Blade", "Freight", "Streak","Vortex","Vincent","Bullet","Clover",
  26.     "Sadler", "Firetruck", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa",
  27.     "Sunrise", "Merit", "Utility Truck", "Nevada", "Yosemite", "Windsor", "Monster",
  28.     "Monster","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RCTiger",
  29.     "Flash","Tahoma","Savanna", "Bandito", "Freight", "Trailer", "Kart", "Mower",
  30.     "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley",
  31.     "Stafford", "BF-400", "Newsvan","Tug","Trailer","Emperor","Wayfarer","Euros",
  32.     "Hotdog", "Club", "Trailer", "Trailer","Andromada","Dodo","RC Cam", "Launch",
  33.     "Police Car LSPD", "Police Car SFPD","Police Car LVPD","Police Ranger",
  34.     "Picador", "S.W.A.T. Van", "Alpha", "Phoenix", "Glendale", "Sadler",
  35.     "Luggage Trailer","Luggage Trailer","Stair Trailer", "Boxville", "Farm Plow",
  36.     "Utility Trailer"
  37. };
  38.  
  39. enum MyEnum
  40. {
  41.     MyString[13]
  42. }
  43. new MyEnumData[1][MyEnum];
  44.  
  45. main()
  46. {
  47.     //===============================Bug1=======================================
  48.     //This also crash with the compiler that comes with the sa-mp server download
  49.  
  50.     new a, b;
  51.     format(MyEnumData[0][MyString], 13, "Hello %s", "World!");
  52.  
  53.     //Crash                               | THIS IS CRASHING IT |
  54.     printf("The output is: %s", (a != b ? MyEnumData[0][MyString] : "Unknown"));
  55.    
  56.     //===============================Bug2=======================================
  57.     //This works with the compiler that comes with the sa-mp server download
  58.    
  59.     printf("The vehicle name is: %s", VehicleNames[23]); //Should print "Mr Whoopee", but prints "Landstalker" no matter what ID I put in
  60.     return true;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment