Run time error 4: "Array index out of bounds"
#1

Код:
[20:39:58] [debug] Run time error 4: "Array index out of bounds"
[20:39:58] [debug]  Accessing element at negative index -1
[20:39:58] [debug] AMX backtrace:
[20:39:58] [debug] #0 0007a130 in ?? () from phg.amx
[20:39:58] [debug] #1 0007a068 in ?? () from phg.amx
[20:39:58] [debug] #2 00079d40 in ?? () from phg.amx
[20:39:58] [debug] #3 00020de0 in public Itter_OnPlayerDisconnect () from phg.amx
[20:39:58] [debug] #4 native CallLocalFunction () [00472ad0] from samp-server.exe
[20:39:58] [debug] #5 0000afb0 in ?? () from phg.amx
[20:39:58] [debug] #6 00000374 in public OnPlayerDisconnect () from phg.amx
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    Delete3DTextLabel(label[playerid]);

/*------------------------------------------------------
-> Squad system
-----------------------------------------------------*/

    LeaveSquad(playerid, 3);

/*------------------------------------------------------
-> Reseting vars
------------------------------------------------------*/

    player[playerid][isspawned]=0;
    team_selection[playerid]=1;
    spawn_timer[playerid]=0;
    spree[playerid]=0;
    PlayerRank[playerid]=1;
    class[playerid]=0;
    medicine[playerid]=0;
    disguise[playerid]=0;
    string_4[playerid] = "-";
    string_3[playerid] = "-";
    string_2[playerid] = "-";
    string_1[playerid] = "-";
    for(new k; k < 10; k++)
    {
        _cp[playerid][k][created] = 0;
        _cp[playerid][k][cid] = -1;
    }
    player_veh[playerid]=0;
    donor_supply[playerid]=0;
    donor_armor[playerid]=0;
    anti_headshot[playerid]=0;
    anti_spy[playerid]=0;
    anti_teargas[playerid]=0;
    logged[playerid]=0;
    player_animing[playerid]=0;
    dm[playerid]=0;
    player_shop[playerid]=-1;

/*------------------------------------------------------
-> Player leaving message
------------------------------------------------------*/

    new string[125];
    if(reason==0)
    {   format(string, sizeof(string), "~r~%s(%d) has left the server the server (Reason: Timeout/Crashed).", GetName(playerid),playerid); }
    if(reason==1)
    {   format(string, sizeof(string), "~r~%s(%d) has left the server the server (Reason: Leaving).", GetName(playerid),playerid); }
    if(reason==2)
    {   format(string, sizeof(string), "~r~%s(%d) has left the server the server (Reason: Kicked/Banned).", GetName(playerid),playerid); }
    SendServerTDMessage(string);
/*------------------------------------------------------*/
    return 1;
}
Reply
#2

You need compile with this and show when happen again
https://github.com/Zeex/samp-plugin-...ith-debug-info
Reply
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
You need compile with this and show when happen again
https://github.com/Zeex/samp-plugin-...ith-debug-info
i don't know where to put "-d3"
Reply
#4

You place it in the pawn.cfg if I'm not mistaken, check the link to confirm.
As ****** said, the link contains full documentation.
Reply
#5

there aren't pawn.cfg on it

Reply
#6

You have to create it I believe, but It goes in that location.
I thought it was there by default but now that I think about it I believe you have to make the .cfg
That's the only thing it should contain however.
Reply
#7

Quote:
Originally Posted by Lynn
Посмотреть сообщение
You have to create it I believe, but It goes in that location.
I thought it was there by default but now that I think about it I believe you have to make the .cfg
That's the only thing it should contain however.
What is written inside of pawn.cfg
Reply
#8

i think you have to open that settings file there is line params put there -d3

mine
pawn Код:
Params=-r -w 203 -d3
Reply
#9

Quote:
Originally Posted by Team_PRO
Посмотреть сообщение
What is written inside of pawn.cfg
It wont have anything, only -d3.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)