[15:03:51] [debug] Run time error 4: "Array index out of bounds" [15:03:51] [debug] Accessing element at index 381 past array upper bound 4 [15:03:51] [debug] AMX backtrace: [15:03:51] [debug] #0 00044468 in public OnVehiclesLoad (0) from GAMEMODE.amx
Veh[r][ServerID] = CreateVehicle(Veh[r][Mod], Veh[r][X], Veh[r][Y], Veh[r][Z], Veh[r][Angle], Veh[r][Col1], Veh[r][Col2], -1);
enum eVeh
{
ORM:ORM_ID,
ID,
Owner,
//............//
};
new Veh[5][eVeh];
[15:03:51] [debug] Accessing element at index 381 past array upper bound 4 new Veh[5][eVeh]; // index 0 - 4 (4 is upperbound)
enum e_Veh
{
ORM:ORM_ID,
ID,
Owner,
Model,
Float:PosX,
// ................................ //
};
new Veh[MAX_PLAYERS][MAX_VEHICLES][e_Veh];
enum e_Veh
{
ORM:ORM_ID,
ID,
Owner,
Model,
Float:PosX,
// ................................ //
};
new Veh[MAX_PLAYERS][5][e_Veh];
|
Код:
[15:03:51] [debug] Accessing element at index 381 past array upper bound 4 new Veh[5][eVeh]; // index 0 - 4 (4 is upperbound) clearly see the problem in the logs |