Strange Array Index Out Of Bounds bug.
#1

It only prints 131 vehicles, MAX_VEHICLES is SAMP default (1000).


pawn Код:
forward LoadVehicles();
public LoadVehicles()
{
    new rows, fields, vehicleid, x;
    cache_get_data(rows, fields);
    printf("Rows %d", rows); // if the rows are more than the size of the variable, reset the rows to match (to avoid run time error 4)
    for(new y; y < rows; y++)
    {
        x = cache_get_row_int(y, vvid);
        VehLModel[x] = cache_get_row_int(y, vVehModel);
        VehLColour1[x] = cache_get_row_int(y, vVehColour1);
        VehLColour2[x] = cache_get_row_int(y, vVehColour2);
        VehLSpawnX[x] = cache_get_row_float(y, vVehSpawnX);
        VehLSpawnY[x] = cache_get_row_float(y, vVehSpawnY);
        VehLSpawnZ[x] = cache_get_row_float(y, vVehSpawnZ);
        VehLSpawnAngle[x] = cache_get_row_float(y, vVehSpawnAngle);
        VehLSiren[x] = cache_get_row_int(y, vVehSiren);
        vehicleid = CreateVehicle(VehLModel[x], VehLSpawnX[x], VehLSpawnY[x],VehLSpawnZ[x], VehLSpawnAngle[x], VehLColour1[x], VehLColour2[x], -1, VehLSiren[x]);
        VehicleSQLID[vehicleid] = x;//ERROR LINE ERROR LINE ERROR LINE
        printf("vehicleid %d", vehicleid);
Reply


Messages In This Thread
Strange Array Index Out Of Bounds bug. - by Dokins - 06.06.2016, 01:25
Re: Strange Array Index Out Of Bounds bug. - by Gammix - 06.06.2016, 01:32
Re: Strange Array Index Out Of Bounds bug. - by Dokins - 06.06.2016, 01:35
Re: Strange Array Index Out Of Bounds bug. - by Gammix - 06.06.2016, 01:38
Re: Strange Array Index Out Of Bounds bug. - by Dokins - 06.06.2016, 01:40
Re: Strange Array Index Out Of Bounds bug. - by Sew_Sumi - 06.06.2016, 03:14

Forum Jump:


Users browsing this thread: 1 Guest(s)