#1

Код HTML:
[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
Line Error:
Код HTML:
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);
r = 1. (printf debug)

Enum:
Код HTML:
enum eVeh
{
    ORM:ORM_ID,
    ID,
    Owner,
    //............//
};
new Veh[5][eVeh];
Reply
#2

BUMP..
Reply
#3

Код:
[15:03:51] [debug]  Accessing element at index 381 past array upper bound 4

new Veh[5][eVeh]; // index 0 - 4 (4 is upperbound)
381 > 4 - error

clearly see the problem in the logs
Reply
#4

hmm.. ok
Reply
#5

Problem with complie time...

Код HTML:
enum e_Veh
{
    ORM:ORM_ID,
    ID,
    Owner,
    Model,
    Float:PosX,
    // ................................ //
};
new Veh[MAX_PLAYERS][MAX_VEHICLES][e_Veh];
[Finished in 33.6s]


Код HTML:
enum e_Veh
{
    ORM:ORM_ID,
    ID,
    Owner,
    Model,
    Float:PosX,
    // ................................ //
};
new Veh[MAX_PLAYERS][5][e_Veh];
[Finished in 10.1s]
Reply
#6

BUMP.
Reply
#7

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
Код:
[15:03:51] [debug]  Accessing element at index 381 past array upper bound 4

new Veh[5][eVeh]; // index 0 - 4 (4 is upperbound)
381 > 4 - error

clearly see the problem in the logs
Yeah,And..
Reply
#8

....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)