Jump to content

Recommended Posts

Posted

Salutare, stie cineva cum rezolv aasta? a fost un baiat mai inainte pe svr meu si a facut spam pe chat dar el nici macar nu era logat, era la inregistrare...


[14:07:51] [debug] #0 001ad508 in ?? (... <2 arguments>) at C:\pawno\gamemodes\nzone.pwn:6313
[14:07:51] [debug] #1 0002fc5c in public OnPlayerText (playerid=101, text[]=@028be5fc "flood_by_hpq<3") at C:\pawno\pawno\include\YSI\y_hooks/impl.inc:901
[14:07:51] [debug] Run time error 4: "Array index out of bounds"
[14:07:51] [debug]  Accessing element at index 101 past array upper bound 100

Stie cineva de la ce e?

Am verificat liniile acelea dar nu este nimic..

 

Posted
Citat

public OnPlayerText (playerid=101, text[]=@028be5fc "flood_by_hpq<3")

Citat

[14:07:51] [debug] Run time error 4: "Array index out of bounds"
[14:07:51] [debug]  Accessing element at index 101 past array upper bound 100

Cel mai probabil ai mai multe sloturi de 100 si cel mai probabil undeva la OnPlayerText (sau ceva ce face hook la callback) foloseste un array pentru playeri care nu a fost actualizat cum trebuie cu marimea necesara serverului. Ti-as recomanda sa folosesti MAX_PLAYERS pentru astfel de array care se foloseste pentru playeri astfel incat doar sa redefinesti valoarea MAX_PLAYERS cu valoarea de sloturi disponibile

Posted

Daca ai 200 slot pui 200 la MAX_PLAYERS. Daca aveai 201 sloturi puneai 201

Problema apare cand nr sloturi e mai mare decat numarul definit in MAX_PLAYERS

Posted

if(SearchIP(GetIP(playerid)) > 1) {
      SCM(playerid, COLOR_RED, "Ai deja un cont creat pe acest IP, daca crezi ca ai luat ban aiurea poti deschide un ticket pe panel."), KickEx(playerid);
}

Cum pot rezolva asta?
Primesc eroarea: error 035: argument type mismatch (argument 1)

Posted (edited)
1 oră în urmă, Hizan Andrei a spus:

if(SearchIP(GetIP(playerid)) > 1) {
      SCM(playerid, COLOR_RED, "Ai deja un cont creat pe acest IP, daca crezi ca ai luat ban aiurea poti deschide un ticket pe panel."), KickEx(playerid);
}

Cum pot rezolva asta?
Primesc eroarea: error 035: argument type mismatch (argument 1)

if(SearchIP(GetIP(playerid)) > 1) {
      SCM(playerid, COLOR_RED, 
          !"Ai deja un cont creat pe acest IP, daca crezi ca ai luat ban aiurea poti deschide un ticket pe panel.");
      return 
        KickEx(playerid);
}

 

Edited by Khain Developer
Posted
if(SearchIP(GetIP(playerid)) > 1) {
      SCM(playerid, COLOR_RED, "Ai deja un cont creat pe acest IP, daca crezi ca ai luat ban aiurea poti deschide un ticket pe panel.");
      KickEx(playerid);
}
Posted

function SearchIP(playerid) {
    new name[MAX_PLAYER_NAME], idd[16], x;
    for(new i, j = cache_num_rows(); i < j; i++) {
        cache_get_field_content(i, "name", name);
        cache_get_field_content(i, "id", idd);        
        x++;
        gString[0] = EOS;
        format(gString, sizeof(gString), "%d. %s (user %d)", x, name, strval(idd));
        SCM(playerid, COLOR_WHITE, gString);
    }
    if(x == 0) SCM(playerid, COLOR_LGREEN, "Eroare: Nu au fost gasite alte conturi de pe acest IP!");
    return true;
}

Asta e linia cu searchip

Posted

in loc de function SearchIP(playerid) foloseste fnction SearchIP(GetPlayerIP(playerid))

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.