Jump to content

Question

Posted

Salutare All, ma ajutati putin cu eroarea asta va rog frumos 

[12:24:45] [debug] Run time error 4: "Array index out of bounds"
[12:24:45] [debug]  Attempted to read/write array element at index 102 in array of size 102
[12:24:45] [debug] AMX backtrace:
[12:24:45] [debug] #0 0038e278 in public DecreaseTimer () at C:\Users\costi\OneDrive\Desktop\Progres Final Server\HPQ123 samp\gamemodes\B-HOOD.pwn:29757.

 

Linia: 29757

Citat

task DecreaseTimer[5000]() {
    new string[256];
    foreach(PersonalVSpawned, idd) if(CarInfo[idd][cTime] < gettime() && CarInfo[idd][cTime] != -1) DestroyPlayerCar(idd); 
    
    foreach(Player, i) {
        if(!IsPlayerConnected(i) && IsPlayerLogged != 1)
            continue;

        new Float: playerArmour; 
        GetPlayerArmour(i, playerArmour);            
        if(playerArmour == 100 && PlayerInfo[pAdmin] == 0 && GetPVarInt(i, "Armour") == 0) {
            if(ServerSystem[3] == 0) NightBot(i, "Cheats (armour-hack)");    
        }
        //if(FPS2 == 0 && AFKSeconds > 120 && PlayerInfo[pSleeping] == 0) NightBot(i, "rakdroid");
        new Float: playerHealth; 
        GetPlayerArmour(i, playerHealth);            
        if(playerHealth == 100 && PlayerInfo[pAdmin] == 0) {
            if(ServerSystem[8] == 0) NightBot(i, "Cheats (health-hack)");    
        }            
                    
        if(PlayerInfo[pWantedLevel] >= 1 && WantedTime == 10) {
               WantedTime = 0;
            PlayerInfo[pWantedLevel] --;
            SetPlayerWantedLevel(i, PlayerInfo[pWantedLevel]);
            Update(i, pWantedLevelx);
            if(PlayerInfo[pWantedLevel] == 0) {
                SCM(i, COLOR_YELLOW, "Acum nu mai ai wanted deoarece politia ti-a pierdut urma!");
                PlayerTextDrawHide(i, WantedTD);
                ClearCrime(i);
                finishAchievement(i, 15);
            }
            else {
                format(string, sizeof(string), "Politia iti pierde urma! Wanted Actual: %d", PlayerInfo[pWantedLevel]);
                SCM(i, COLOR_YELLOW, string);
            }
            format(string, sizeof(string), "%s [%d] lost 1 wanted level. W: %d", GetName(i), i, PlayerInfo[pWantedLevel]);
            SendTeamMessage(14, 0x2e64feFF, string);
            SendTeamMessage(3, COLOR_DBLUE, string);
            SendTeamMessage(2, COLOR_DBLUE, string);
            SendTeamMessage(1, COLOR_DBLUE, string);            
        }
        
        if(IsPlayerInRangeOfPoint(i, 30.0, 184.3529,-1825.4983,8.7530)) {    
            if(GetPVarInt(i, "Listening") == 0) {
                PlayAudioStreamForPlayer(i, beachlink, 184.3529,-1825.4983,8.7530, 30.0, 1);
                SetPVarInt(i, "Listening", 1);
            }    
        }
        else {
            if(GetPVarInt(i, "Listening") == 1) SetPVarInt(i, "Listening", 0);
        }
        
        // -- Variables
        for(new t = 0; t < 18; t++) {
            if(DeelayCommand[t] != 0) {
                DeelayCommand[t] -= 5;    
                if(DeelayCommand[t] < 0) DeelayCommand[t] = 0;
            }                
        }
        for(new t = 0; t < 13; t++) {
            if(JobDeelay[t] != 0) {
                JobDeelay[t] -= 5;    
                if(JobDeelay[t] < 0) JobDeelay[t] = 0;
            }                
        }            

        if(PlayerTime[0] != 0) PlayerTime[0] -= 5;
        if(PlayerTime[0] < 0) PlayerTime[0] = 0;
        
        if(PlayerInfo[pReportTime] >= 1) {
            PlayerInfo[pReportTime] -= 5;    
            if(PlayerInfo[pReportTime] < 0) PlayerInfo[pReportTime] = 0;
        }
        if(PlayerInfo[pNewbieMute] >= 1) {
            PlayerInfo[pNewbieMute] -= 5;
            if(PlayerInfo[pNewbieMute] < 0) PlayerInfo[pNewbieMute] = 0;
        }
        if(FreezeTime != 0) {
            FreezeTime -= 5;
            if(FreezeTime < 0) FreezeTime = 0;
            if(FreezeTime == 0) {
                SCM(i, COLOR_LIGHTBLUE, "Acum nu mai ai freeze!");
                TogglePlayerControllable(i, 1);
            }
        }                        

        if(PlayerToPoint(50, i, -2317.8091,-1637.5575,483.7031)) {
            for(new m; m < 2; m++) {
                if(PlayerInfo[pDailyMission][m] == 7) CheckMission(i, m);
            }        
        }
        if(PlayerToPoint(50, i, 1962.4126,-2193.3279,13.5469)) {
            for(new m; m < 2; m++) {
                if(PlayerInfo[pDailyMission][m] == 😎 CheckMission(i, m);
            }        
        }
        if(PlayerToPoint(100, i, 1338.6273,2153.1045,11.0578)) {
            for(new m; m < 2; m++) {
                if(PlayerInfo[pDailyMission][m] == 9) CheckMission(i, m);
            }        
        }        
    }    
    return true;
}

 

1 answer to this question

Recommended Posts

  • 0
Posted

Fa un fisier pawn.cfg, in el pune -d3 si compileaza... da restart la server si vezi cand intalnesti din nou eroarea la ce linie e(in server_log).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.