Jump to content
  • 0

Problema gamemode burned


OneStix

Question

[18:50:47] [debug] Run time error 4: "Array index out of bounds"

[18:50:47] [debug] Accessing element at index 65535 past array upper bound 999
[18:50:47] [debug] AMX backtrace:
[18:50:47] [debug] #0 001a8b2c in public cmd_invite (0, 175260480) from wa-rpg.amx
[18:50:47] [debug] #1 native CallLocalFunction () from samp-server.exe
[18:50:47] [debug] #2 00012d84 in public OnPlayerCommandText (0, 175260440) from wa-rpg.amx


HELP ME PLS, AM ADAUGAT FACTIUNEA LVPD( Tutorial Edison Tuts )

CMD:invite(playerid, params[]) {
    if(PlayerInfo[playerid][pRank] < 6) return SendClientMessage(playerid, -1, "Comanda aceasta este doar pentru lideri si sublideri.");
    new id,string[100];
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: {FFFFFF}/invite <playerid/name>");
    if(PlayerInfo[id][pFpunish] != 0) return SendClientMessage(playerid,-1, "Acel player are FP.");
    if(GetFactionMembers2(PlayerInfo[playerid][pMember]) >= 16) return SCM(playerid, -1, "Ai numarul maxim de membrii in factiune.");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(PlayerInfo[id][pMember] != 0 || PlayerInfo[id][pLeader] != 0) return SendClientMessage(playerid, -1, "Acel player face deja parte dintr-o factiune!");
    if(IsInBlacklist(id, PlayerInfo[playerid][pMember])) return SCM(playerid, -1, "Acel player este pe blacklist-ul factiunii!");                            
    if(PlayerInfo[playerid][pAdmin] < 7) {
        new szQuery[256];
        format(szQuery, sizeof(szQuery), "SELECT * FROM `app_factions` WHERE `UserID`='%d' AND `Status`='1' AND `Faction`='%d'", PlayerInfo[id][pSQLID], PlayerInfo[playerid][pLeader]);
        new Cache: result = mysql_query(SQL, szQuery);
        new test = cache_get_row_count ();
        cache_delete(result);
        if(test == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti baga un player in factiune care nu are o aplicatie acceptata!");        
    }
    format(string, sizeof(string), "Lider %s te-a invitat in factiunea %s. (/accept invite %d)", GetName(playerid), FactionName(PlayerInfo[playerid][pMember]), playerid);
    SendClientMessage(id, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "L-ai invitat pe %s in factiunea ta.", GetName(id));
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    InvitedFaction[id] = PlayerInfo[playerid][pMember];
    InvitedBy[id] = playerid;
    SetPVarInt(id, "InvitedFaction", 1);
    return 1;
}
 
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.