Server crash
#1

I get a proble when I connect to the server, after the login, i get stuck on the class selection (this didnt happen until i made a function)

PHP код:
stock setUpFriendVars(playerid){
    for(new 
0MAX_FRIENDS++){
        
Friends[playerid][i][dbid] = 0;
        
Friends[playerid][i][serverid] = -1;
        
Friends[playerid][i][online] = false;
    }
    return 
true;

So what this does is set the values to default when then player connects
But when I put this on OnPlayerConnect i get

Код:
[15:51:35] [debug] Run time error 4: "Array index out of bounds"
[15:51:35] [debug]  Accessing element at negative index -1
[15:51:35] [debug] AMX backtrace:
[15:51:35] [debug] #0 000258f4 in ?? (-1, 0, 9411992, 9411996, 0) from main.amx
[15:51:35] [debug] #1 0002b9f0 in ?? (0) from main.amx
[15:51:35] [debug] #2 0001fda0 in public OnAccountLoad (0) from main.amx
[15:51:43] [debug] Run time error 4: "Array index out of bounds"
[15:51:43] [debug]  Accessing element at negative index -1
[15:51:43] [debug] AMX backtrace:
[15:51:43] [debug] #0 000258f4 in ?? (-1, 1, 9412000, 9412004, 0) from main.amx
[15:51:43] [debug] #1 0002bbf0 in ?? (0) from main.amx
[15:51:43] [debug] #2 00026b58 in ?? (0, 1) from main.amx
[15:51:43] [debug] #3 00011474 in public SSCANF_OnPlayerDisconnect (0, 1) from main.amx
[15:51:43] [debug] #4 0000265c in public Itter_OnPlayerDisconnect (0, 1) from main.amx
[15:51:43] [debug] #5 00001740 in public OnPlayerDisconnect (0, 1) from main.amx
[15:51:43] [part] Champa has left the server (0:1)
Reply


Messages In This Thread
Server crash - by Marcuse - 20.01.2016, 13:57
Re: Server crash - by Jstylezzz - 20.01.2016, 15:45
Re: Server crash - by Marcuse - 20.01.2016, 16:22
Re: Server crash - by Marcuse - 20.01.2016, 18:40
Re: Server crash - by Prokill911 - 20.01.2016, 19:12

Forum Jump:


Users browsing this thread: 2 Guest(s)