Accessing element at negative index -400
#1

Код:
[10:19:33] [debug] AMX backtrace:
[10:19:33] [debug] #0 00105138 in public Veh_Speedo () at E:\GM.pwn:19834
[10:19:34] [debug] Run time error 4: "Array index out of bounds"
[10:19:34] [debug]  Accessing element at negative index -400
pawn Код:
function Veh_Speedo( )
{
    new sp_string[ 256 ], liSpeed;
    foreach( Player, i )
    {
        new vehicleid = GetPlayerVehicleID( i );
        if( vehicleid != 0 && SpeedoStats[ i ] == true )
        {
            liSpeed = GetPlayerSpeed( i, true );
            format( sp_string, sizeof(sp_string), "~w~~h~'  ~r~~h~Vehicle: ~w~~h~%s", vehName[ GetVehicleModel( vehicleid ) - 400 ] );
            PlayerTextDrawSetString( i, Speedo_TD[ 0 ], sp_string );
            format( sp_string, sizeof(sp_string), "~b~~h~KM/h: ~w~~h~%d", liSpeed );
            PlayerTextDrawSetString( i, Speedo_TD[ 1 ], sp_string );
        }
    }
    return true;
}
Reply


Messages In This Thread
Accessing element at negative index -400 - by nGen.SoNNy - 18.11.2014, 07:55
Re: Accessing element at negative index -400 - by xCrazyMonkey - 18.11.2014, 08:14
Re: Accessing element at negative index -400 - by oliverrud - 18.11.2014, 08:22
Re: Accessing element at negative index -400 - by nGen.SoNNy - 18.11.2014, 10:01
Re: Accessing element at negative index -400 - by Threshold - 18.11.2014, 11:41
Re: Accessing element at negative index -400 - by nGen.SoNNy - 18.11.2014, 13:26

Forum Jump:


Users browsing this thread: 5 Guest(s)