Run time error 4: "Array index out of bounds (more then 6/7:C)
#7

I think others solved, no errors
But this one ?
how to solve it ?
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
new 
text[128];
    if(
IsCapturing[playerid][usapro] == 1)
    {
        if(
IsPlayerInVehicle(playeridusapro))
        {
             
DisablePlayerCheckpoint(playerid);
            
IsCapturing[playerid][usapro] = 0;
                
format(textsizeof(text), "~r~%s~w~ has Captured ~r~USA prototype ~w~for his team!"pName(playerid));
                
RemovePlayerFromVehicle(playerid);
                        
SCM(playeridC_GREEN"Congratulations! You got +6 score and +6000 cash!");
GivePlayerMoney(playerid6000);
SetVehicleToRespawn(usapro);
SetPlayerScore(playeridGetPlayerScore(playerid)+6);
TogglePlayerAllDynamicCPs(playerid1);
TextStats(playerid);
                
Savestatus(playerid);
        }
        else
        {
             
DisablePlayerCheckpoint(playerid);
            
SCM(playeridRED"You're not in the USA Prototype.");
        }
    }
    if(
IsCapturing[playerid][auspro] == 1)
    {
        if(
IsPlayerInVehicle(playeridauspro))
        {
            
DisablePlayerCheckpoint(playerid);
            
IsCapturing[playerid][auspro] = 0;
            
TextStats(playerid);
                
Savestatus(playerid);
                
format(textsizeof(text), "~r~%s~w~ has Captured ~r~ Australia prototype ~w~for his team!"pName(playerid));
                
RemovePlayerFromVehicle(playerid);
 
SCM(playeridC_GREEN"Congratulations! You got +6 score and +6000 cash!");
 
GivePlayerMoney(playerid6000);
 
SetVehicleToRespawn(auspro);
 
SetPlayerScore(playeridGetPlayerScore(playerid)+6);
TogglePlayerAllDynamicCPs(playerid1);
        }
        else
        {
              
DisablePlayerCheckpoint(playerid);
            
SCM(playeridRED"You're not in the Australia Prototype.");
        }
    }
    if(
IsCapturing[playerid][arabpro] == 1)
    {
        if(
IsPlayerInVehicle(playeridarabpro))
        {
            
DisablePlayerCheckpoint(playerid);
            
IsCapturing[playerid][arabpro] = 0;
            
TextStats(playerid);
                
Savestatus(playerid);
                
format(textsizeof(text), "~r~%s~w~ has Captured ~r~Arabian prototype ~w~for his team!"pName(playerid));
                
RemovePlayerFromVehicle(playerid);
 
SCM(playeridC_GREEN"Congratulations! You got +6 score and +6000 cash!");
 
GivePlayerMoney(playerid6000);
 
SetVehicleToRespawn(arabpro);
 
SetPlayerScore(playeridGetPlayerScore(playerid)+6);
TogglePlayerAllDynamicCPs(playerid1);
        }
        else
        {
            
DisablePlayerCheckpoint(playerid);
            
SCM(playeridRED"You're not in the Arabian Prototype.");
        }
    }
    if(
IsCapturing[playerid][sovpro] == 1)
    {
        if(
IsPlayerInVehicle(playeridsovpro))
        {
            
DisablePlayerCheckpoint(playerid);
                   
RemovePlayerFromVehicle(playerid);
                   
TextStats(playerid);
                
Savestatus(playerid);
                   
format(textsizeof(text), "~r~%s~w~ has Captured ~r~Soviet prototype ~w~for his team!"pName(playerid));
                
IsCapturing[playerid][sovpro] = 0;
                
SCM(playeridC_GREEN"Congratulations! You got +6 score and +6000 cash!");
                 
GivePlayerMoney(playerid6000);
                
SetVehicleToRespawn(sovpro);
                
SetPlayerScore(playeridGetPlayerScore(playerid)+6);
                 
TogglePlayerAllDynamicCPs(playerid1);
        }
        else
        {
            
DisablePlayerCheckpoint(playerid);
            
SCM(playeridRED"You're not in the Soviet Prototype.");
        }
    }
    if(
IsCapturing[playerid][eurapro] == 1)
    {
        if(
IsPlayerInVehicle(playerideurapro))
        {
            
DisablePlayerCheckpoint(playerid);
                
format(textsizeof(text), "~r~%s~w~ has Captured ~r~Erusia prototype ~w~for his team!"pName(playerid));
                
IsCapturing[playerid][eurapro] = 0;
                
RemovePlayerFromVehicle(playerid);
                
TextStats(playerid);
                
Savestatus(playerid);
                 
SCM(playeridC_GREEN"Congratulations! You got +6 score and +6000 cash!");
                 
GivePlayerMoney(playerid6000);
             
SetVehicleToRespawn(eurapro);
             
SetPlayerScore(playeridGetPlayerScore(playerid)+6);
              
TogglePlayerAllDynamicCPs(playerid1);
        }
        else
        {
            
DisablePlayerCheckpoint(playerid);
            
SCM(playeridRED"You're not in the Erusia Prototype.");
        }
    }
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)