08.07.2013, 19:54
Codes that are out of bounds
Arrays:
ERRORS:
This is the last line errors
pawn Код:
// Taxi Vehicles
JobInfo[JOB_TAXI][jCars][0] = CreateVehicle(420,1727.4966,-1858.6796,13.1931,268.8253,6,6,32000); //Taxi //Error here 1
JobInfo[JOB_TAXI][jCars][1] = CreateVehicle(420,1727.6429,-1851.1127,13.1925,269.7512,6,6,32000); //Taxi 2
JobInfo[JOB_TAXI][jCars][2] = CreateVehicle(420,1742.3689,-1858.6511,13.1929,269.8705,6,6,32000); //Taxi 3
JobInfo[JOB_TAXI][jCars][3] = CreateVehicle(420,1753.3341,-1850.7306,13.2609,271.9358,6,6,32000); //Taxi 4
JobInfo[JOB_TAXI][jCars][4] = CreateVehicle(438,1763.1429,-1858.9789,13.4170,269.3741,6,6,32000); //Taxi Cab 1
JobInfo[JOB_TAXI][jCars][5] = CreateVehicle(438,1771.1193,-1850.6611,13.5132,268.5895,6,6,32000); //TaxiCab 2
JobInfo[JOB_TAXI][jCars][6] = CreateVehicle(438,1780.1282,-1850.4249,13.5132,270.4590,6,6,32000); //Taxi Cab 3
JobInfo[JOB_TAXI][jCars][7] = CreateVehicle(438,1787.4374,-1859.3351,13.5058,268.6409,6,6,32000); //Taxi Cab 4 - Error Ends here
pawn Код:
enum jobInfo
{
jCars[17],
jTrailers[9]
}
new JobInfo[MAX_JOBS][jobInfo];
Код:
C:\Users\Administrator\Desktop\Legendary Gaming Roleplay\gamemodes\LG-RP.pwn(35750) : error 032: array index out of bounds (variable "JobInfo") C:\Users\Administrator\Desktop\Legendary Gaming Roleplay\gamemodes\LG-RP.pwn(35751) : error 032: array index out of bounds (variable "JobInfo") C:\Users\Administrator\Desktop\Legendary Gaming Roleplay\gamemodes\LG-RP.pwn(35752) : error 032: array index out of bounds (variable "JobInfo") C:\Users\Administrator\Desktop\Legendary Gaming Roleplay\gamemodes\LG-RP.pwn(35753) : error 032: array index out of bounds (variable "JobInfo") C:\Users\Administrator\Desktop\Legendary Gaming Roleplay\gamemodes\LG-RP.pwn(35754) : error 032: array index out of bounds (variable "JobInfo") C:\Users\Administrator\Desktop\Legendary Gaming Roleplay\gamemodes\LG-RP.pwn(35755) : error 032: array index out of bounds (variable "JobInfo") C:\Users\Administrator\Desktop\Legendary Gaming Roleplay\gamemodes\LG-RP.pwn(35756) : error 032: array index out of bounds (variable "JobInfo") C:\Users\Administrator\Desktop\Legendary Gaming Roleplay\gamemodes\LG-RP.pwn(35757) : error 032: array index out of bounds (variable "JobInfo") C:\Users\Administrator\Desktop\Legendary Gaming Roleplay\gamemodes\LG-RP.pwn(48628) : error 032: array index out of bounds (variable "JobInfo")
pawn Код:
stock IsTaxiVehicle(vehicleid)
{
for(new i=0; i<10; i++)
{
if(vehicleid == JobInfo[JOB_TAXI][jCars][i]) return 1; // Array Error
}
return 0;
}