Jump to content
  • 0

Question

Posted (edited)

Am adaugat o factiune dar nu merge comanda /factions, habar nu am ce are, 

Server log :

9:39:28] [debug]  Accessing element at index 16 past array upper bound 15
[19:39:28] [debug] AMX backtrace:
[19:39:28] [debug] #0 0031d914 in GetFactionMembers (fid=16) at C:\burned\gamemodes\nzone.pwn:24065
[19:39:28] [debug] #1 002c5798 in public @_yCfactions (playerid=0, params[]=@028c0234 "", help=0) at C:\burned\gamemodes\nzone.pwn:19931
[19:39:28] [debug] #2 002c564c in public @yC_factions (... <4 arguments>)  at C:\burned\gamemodes\nzone.pwn:19927
[19:39:28] [debug] #3 native CallRemoteFunction () from samp03svr
[19:39:28] [debug] #4 00040b9c in Command_Process (playerid=0, cmdtext[]=@028c020c "/factions", help=0) at C:\burned\pawno\include\YSI\y_commands.inc:2503
[19:39:28] [debug] #5 000401dc in ?? (... <2 arguments>) at C:\burned\pawno\include\YSI\y_commands.inc:2297
[19:39:28] [debug] #6 0002fd34 in public OnPlayerCommandText (playerid=0, cmdtext[]=@028c020c "/factions") at C:\burned\pawno\include\YSI\y_hooks/impl.inc:946
[19:44:30] QuitBot: Adminul CosminAirMaChinE left the game (Quit)

 

Linia: 19931: format(szDialog, sizeof(szDialog), "%d. {%s}%s\t%s/17\n", i, ColorFaction, FactionName(i), GetFactionMembers(i));

linia 19927:YCMD:factions(playerid, params[], help) {

linia:24065:    if(FactionMembers[fid] >= 10) format(string, sizeof(string), "%d", FactionMembers[fid]);

comanda factions.:YCMD:factions(playerid, params[], help) {
    new szDialog[210], szDialog2[1700];
    strcat(szDialog2, "Numele factiunii\tMembrii/Locuri\tAplicatii\n");
    for(new i = 1; i < 17; i++) {
        format(szDialog, sizeof(szDialog), "%d. {%s}%s\t%s/17\n", i, ColorFaction, FactionName(i), GetFactionMembers(i));
        strcat(szDialog2, szDialog);
    }
    ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_TABLIST_HEADERS, "Factiuni:", szDialog2, "Ok", "Close");
    return 1;
}
stock GetFactionS}
tatus(fid) {
    new szStatus[180];
    if(DynamicFactions[fid][fApp] == 1) format(szStatus, sizeof(szStatus), "{FF0000}Inchise{FFFFFF}");
    else format(szStatus, sizeof(szStatus), "{2FC914}Deschise{FFFFFF}");
    return szStatus;
}
stock GetFactionStatus2(fid) {
    new szStatus[180];
    if(DynamicFactions[fid][fApp] == 0) format(szStatus, sizeof(szStatus), "Inchise");
    else format(szStatus, sizeof(szStatus), "Deschise");
    return szStatus;
}

 

 

Va multumesc!

Edited by cristi111

3 answers to this question

Recommended Posts

  • 0
Posted

Arata functia GetFactionMembers

  • Upvote 1

Discord:
! Akan !#6675

  • 0
Posted

Nu e de la GetFactionMembers, probabil ai MAX_GROUPS 15 (mareste-l la 20).

  • 0
Posted
1 hour ago, IrinelBro57 said:

Nu e de la GetFactionMembers, probabil ai MAX_GROUPS 15 (mareste-l la 20).

am rezolvat era de la dynamic factions mi-am dat seama singur oricum multumesc

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.