24.09.2009, 20:52
hi, i got this code in " OnGameModeInit" and for some reason the for loop is stopping the code... ( its doing everything in for loop all the work that it should do... but it aint continuing the code that is found after the for loop.
i got more code.... but there is no need to write it all.... from the function: " print("All Vehicle Data had been stored"); " onwards it don't work.
I was thinking that if there is a for-loop limit.... because in InGameModeInit i got other loop as well but it works for making all skins available.... which it has nothing to do with this one.
Please note when i " commented " this code ( the for loop ) it worked all fine so its something from the for loop i guess
Now i'm using Version: 0.3 RC6-2 ( As server version ) and 0.3 RC6-1 for Client.
Any help?
EDIT:
I debugged it myself and from the result i found out that the problem is from this line:
anyone can tell me what's wrong with it?
here are the " Vehicle Info " and the " Vehicle name"
Код:
print("All Vehicles were Successfully Spawned!");
for (new v = 1; v < MAX_VEHICLES; v++)
{
VehicleInfo[v][ID] = v;
VehicleInfo[v][modelname] = VehicleName[GetVehicleModel(v)-400][0];
VehicleInfo[v][modelid] = GetVehicleModel(v);
GetVehiclePos(v,VehicleInfo[v][Xaxis],VehicleInfo[v][Yaxis],VehicleInfo[v][Zaxis]);
GetVehicleZAngle(v,VehicleInfo[v][Angle]);
VehicleInfo[v][fuel] = maxfuel;
format(string,sizeof(string),"Vehicle ID: %d Data had been saved.",v);
print(string);
}
print("All Vehicle data had been stored.");
I was thinking that if there is a for-loop limit.... because in InGameModeInit i got other loop as well but it works for making all skins available.... which it has nothing to do with this one.
Please note when i " commented " this code ( the for loop ) it worked all fine so its something from the for loop i guess
Now i'm using Version: 0.3 RC6-2 ( As server version ) and 0.3 RC6-1 for Client.
Any help?
EDIT:
I debugged it myself and from the result i found out that the problem is from this line:
Код:
VehicleInfo[v][modelname] = VehicleName[GetVehicleModel(v)-400][0];
here are the " Vehicle Info " and the " Vehicle name"
Код:
new VehicleName[212][0] = {
"Landstalker",
"Bravura",
"Buffalo",
"Linerunner",
"Pereniel",
"Sentinel",
"Dumper",
"Firetruck",
"Trashmaster",
"Stretch",
"Manana",
"Infernus",
"Voodoo",
"Pony",
"Mule",
"Cheetah",
"Ambulance",
"Leviathan",
"Moonbeam",
"Esperanto",
"Taxi",
"Washington",
"Bobcat",
"Mr Whoopee",
"BF Injection",
"Hunter",
"Premier",
"Enforcer",
"Securicar",
"Banshee",
"Predator",
"Bus",
"Rhino",
"Barracks",
"Hotknife",
"Trailer", //artict1
"Previon",
"Coach",
"Cabbie",
"Stallion",
"Rumpo",
"RC Bandit",
"Romero",
"Packer",
"Monster Truck",
"Admiral",
"Squalo",
"Seasparrow",
"Pizzaboy",
"Tram",
"Trailer", //artict2
"Turismo",
"Speeder",
"Reefer",
"Tropic",
"Flatbed",
"Yankee",
"Caddy",
"Solair",
"Berkley's RC Van",
"Skimmer",
"PCJ-600",
"Faggio",
"Freeway",
"RC Baron",
"RC Raider",
"Glendale",
"Oceanic",
"Sanchez",
"Sparrow",
"Patriot",
"Quad",
"Coastguard",
"Dinghy",
"Hermes",
"Sabre",
"Rustler",
"ZR-350",
"Walton",
"Regina",
"Comet",
"BMX",
"Burrito",
"Camper",
"Marquis",
"Baggage",
"Dozer",
"Maverick",
"News Chopper",
"Rancher",
"FBI Rancher",
"Virgo",
"Greenwood",
"Jetmax",
"Hotring",
"Sandking",
"Blista Compact",
"Police Maverick",
"Boxville",
"Benson",
"Mesa",
"RC Goblin",
"Hotring Racer", //hotrina
"Hotring Racer", //hotrinb
"Bloodring Banger",
"Rancher",
"Super GT",
"Elegant",
"Journey",
"Bike",
"Mountain Bike",
"Beagle",
"Cropdust",
"Stunt",
"Tanker", //petro
"RoadTrain",
"Nebula",
"Majestic",
"Buccaneer",
"Shamal",
"Hydra",
"FCR-900",
"NRG-500",
"HPV1000",
"Cement Truck",
"Tow Truck",
"Fortune",
"Cadrona",
"FBI Truck",
"Willard",
"Forklift",
"Tractor",
"Combine",
"Feltzer",
"Remington",
"Slamvan",
"Blade",
"Freight",
"Streak",
"Vortex",
"Vincent",
"Bullet",
"Clover",
"Sadler",
"Firetruck", //firela
"Hustler",
"Intruder",
"Primo",
"Cargobob",
"Tampa",
"Sunrise",
"Merit",
"Utility",
"Nevada",
"Yosemite",
"Windsor",
"Monster Truck", //monstera
"Monster Truck", //monsterb
"Uranus",
"Jester",
"Sultan",
"Stratum",
"Elegy",
"Raindance",
"RC Tiger",
"Flash",
"Tahoma",
"Savanna",
"Bandito",
"Freight", //freiflat
"Trailer", //streakc
"Kart",
"Mower",
"Duneride",
"Sweeper",
"Broadway",
"Tornado",
"AT-400",
"DFT-30",
"Huntley",
"Stafford",
"BF-400",
"Newsvan",
"Tug",
"Trailer", //petrotr
"Emperor",
"Wayfarer",
"Euros",
"Hotdog",
"Club",
"Trailer", //freibox
"Trailer", //artict3
"Andromada",
"Dodo",
"RC Cam",
"Launch",
"Police Car (LSPD)",
"Police Car (SFPD)",
"Police Car (LVPD)",
"Police Ranger",
"Picador",
"S.W.A.T. Van",
"Alpha",
"Phoenix",
"Glendale",
"Sadler",
"Luggage Trailer", //bagboxa
"Luggage Trailer", //bagboxb
"Stair Trailer", //tugstair
"Boxville",
"Farm Plow", //farmtr1
"Utility Trailer" //utiltr1
};
Код:
enum vInfo
{
ID,
modelname[30],
modelid,
Float:Xaxis,
Float:Yaxis,
Float:Zaxis,
Float:Angle,
fuel,
}
new VehicleInfo[MAX_VEHICLES][vInfo];

