24.12.2013, 16:34
First sorry for my bad english and bad title name( maybye ), but I have problem.
I have that error not in compiler but in concole( when playing ):
I creating speedometer and i upload some functions, what can help:
I don't upload all.
That is 682 line.
P.S. Merry Christmas and Happy New Year!
I have that error not in compiler but in concole( when playing ):
Код:
[19:37:54] [debug] AMX backtrace: [19:37:54] [debug] #0 0000aa98 in public OnPlayerUpdate (playerid=0) at C:\Users\Vartotojas\Desktop\SA-MP\gamemodes\rfe.pwn:682 [19:37:54] [debug] Run time error 4: "Array index out of bounds" [19:37:54] [debug] Accessing element at index 11 past array upper bound 0
Код:
new Float:SpeedOfVehicles[ ][ ] = { {160.0},//Landstaker {160.0}, {200.0}, {120.0}, {150.0}, {165.0}, {110.0}, {170.0},//Firetruck {110.0},//Trashmaster {180.0}, {160.0}, {240.0}, {160.0}, {160.0}, {140.0}, {230.0},//Cheetah {155.0} };//Ambulance
Код:
new bar = floatround( GetVehicleSpeed(GetPlayerVehicleID(playerid)) / SpeedOfVehicles[ vehar ][ model - 400 ] * 30,floatround_round);
P.S. Merry Christmas and Happy New Year!