Errors in crashdetect "Array index out of bounds" x2
#1

[19:11:29] [debug] Run time error 4: "Array index out of bounds"
[19:11:29] [debug] Attempted to read/write array element at negative index -400
[19:11:29] [debug] AMX backtrace:
[19:11:29] [debug] #0 0016ada0 in public Speed () from Mundito.amx.

PHP код:
public Speed()
{
    for(new 
0GetMaxPlayers(); p++) if(IsPlayerConnected(p) && !IsPlayerNPC(p))
    {
        new 
vehicleid GetPlayerVehicleID(p);
        if(
vehicleid)
        {
            new 
string[128], Float:XFloat:YFloat:ZFloat:PointToPointFloat:vhealth;
             
GetVehicleVelocity(vehicleidXYZ);
             
PointToPoint = (floatsqroot(floatpower(X2) + floatpower(Y2) + floatpower(Z2)))*100;
            
GetVehicleHealth(vehicleid,vhealth);
            
format(string,sizeof string ,"{00D1FF}Vehнculo: {FFFFFF}%s\n{00D1FF}Vida: {FFFFFF}%.2f\n{00D1FF}Velocidad: {FFFFFF}%ikm/h"VehicleName[GetVehicleModel(vehicleid)-400], vhealthfloatround(PointToPointfloatround_floor));
            
DeletePlayer3DTextLabel(pspeedo3Dtext);
            
speedo3Dtext CreatePlayer3DTextLabel(pstringspeedcolor0.0,-1.6,-0.35,20.0INVALID_PLAYER_IDvehicleid);
        } else if(
p) { DeletePlayer3DTextLabel(pspeedo3Dtext); }
    }

help me, tranks
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)