Jump to content

Question

Posted

Buna Seara, am adaugat si eu o noua Factiune, GM este HPQ123, dar dupa ce am adaugat in consola imi tot apare aceasta EROARE 

mai jos postez si linia: 30855

 

Citat

[22:37:22] [debug] Run time error 4: "Array index out of bounds"
[22:37:22] [debug]  Attempted to read/write array element at index 16 in array of size 16
[22:37:22] [debug] AMX backtrace:
[22:37:22] [debug] #0 003a5a1c in public Timers () at C:\Users\LogiS\Desktop\LogiStep.RpG\gamemodes\B-HOOD.pwn:30855

 

 

Citat

        if(IsAMember(i)) {
            if(InWar[PlayerInfo[pMember]] == 1) {    
                new faction = PlayerInfo[pMember];
                for(new wi = 1; wi < sizeof(TurfInfo);wi++) {
                    if((WarInfo[wi][wFaction] == faction) || (WarInfo[wi][wAttacker] == faction)) {
                        new attackers = WarInfo[wi][wAttacker];
                        new defenders = WarInfo[wi][wFaction];
                        new uciderii = 0;
                        uciderii += ucideri[wi];
                        new decesee = 0;
                        decesee += decese[wi];
                        new Float: atscore = 0.0;
                        new Float: defscore = 0.0;
                        atscore = WarScoreF[attackers][wi];
                        defscore = WarScoreF[defenders][wi];                        
                
                        if(playerDeath == -1 && GetPlayerInterior(i) == 0 && IsAMember(i) && GetPlayerVirtualWorld(i) == 0 && PlayerInfo[pWantedLevel] == 0 && PlayerInfo[pJailTime] == 0) {                            
                            SetPlayerVirtualWorld(i, wi);
                            format(string, sizeof(string), "Ai fost teleportat in virtual world-ul %d deoarece mafia ta este intr-un war.", wi);
                            SCM(i, COLOR_YELLOW, string);
                        }

                        if(WarInfo[wi][wFaction] == faction)
                        {
                            format(string, sizeof(string), "Turf: %s (%d)~n~%s %.1f - %.1f %s~n~Ucideri: %d Decese: %d Scor: %d~n~Secunde pe turf: %d~n~Timp war: ~y~~h~%s~w~~h~",
                            TurfInfo[wi][zName],wi,FactionName(attackers),atscore,defscore,FactionName(defenders),
                            uciderii, decesee, uciderii-decesee, WarSeconds, CalculeazaTimp2(WarInfo[wi][wTime]));
                        }
                        if(WarInfo[wi][wAttacker] == faction)
                        {
                            format(string, sizeof(string), "Turf: %s (%d)~n~%s %.1f - %.1f %s~n~Ucideri: %d Decese: %d Scor: %d~n~Secunde pe turf: %d~n~Timp war: ~y~~h~%s~w~~h~",
                            TurfInfo[wi][zName],wi,FactionName(attackers),atscore,defscore,FactionName(defenders),
                            uciderii, decesee, uciderii-decesee, WarSeconds, CalculeazaTimp2(WarInfo[wi][wTime]));
                        }                            
                    }
                }
                PlayerTextDrawSetString(i, WarTime, string);
                PlayerTextDrawShow(i, WarTime);                            
            }                
        
            if(IsPlayerInTurf(i, InWarTurf[PlayerInfo[pMember]])) {
                new turf = InWarTurf[PlayerInfo[pMember]];
                if(WarInfo[turf][wFaction] == PlayerInfo[pMember] || WarInfo[turf][wAttacker] == PlayerInfo[pMember]) {
                    if(IsPlayerPaused(i) == false) WarSeconds ++;
                    if(TurfTime == 0 && IsPlayerInAnyVehicle(i)) SCM(i, COLOR_YELLOW, "Ai intrat pe teritoriu. Peste 10 secunde o sa fii dat jos din vehicul.");
                    if(TurfTime < 10) TurfTime ++;
                    if(TurfTime == 10) {
                        if(IsPlayerInAnyVehicle(i)) {
                            new Float: Pos[3];
                            GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
                            SetPlayerPosEx(false, i, Pos[0], Pos[1], Pos[2]+1);
                        }
                    }
                }
            }            
        }                
    }    
    for(new i = 0; i < 3; i++) {
        if(PaintTime == 0) {
            PaintTime = -1; PaintText = 60;
        }    
    }        
    OtherTimer();
    return true;
}

 

1 answer to this question

Recommended Posts

  • 0
Posted
1 oră în urmă, BereRece a spus:

Buna Seara, am adaugat si eu o noua Factiune, GM este HPQ123, dar dupa ce am adaugat in consola imi tot apare aceasta EROARE 

mai jos postez si linia: 30855

 

 

 

 

Array index out of bounds

Inseamna ca tu incerci sa faci o variabila sa zicem pentru 5 oameni si o folosesti pentru fix 5 sau 6, mereu daca ai 14 factiuni adaugi +1.

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

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.