05.04.2019, 16:13
(
Last edited by NATANGameron; 05/04/2019 at 05:51 PM.
)
Ao iniciar meu servidor os NPC Zumbi entram mas ocorrem vбrios erros:
Verifiquei o OnPlayerConnect e sу encontrei isso:
Enquanto os Zumbis entraram com um monte de erros os outros NPC soldados conseguiram sem nenhum erro.
PHP Code:
[13:07:33] [npc:join] Zombie(1000) has joined the server (938:127.0.0.1)
[13:07:33] [debug] Run time error 4: "Array index out of bounds"
[13:07:33] [debug] Accessing element at index 938 past array upper bound 99
[13:07:33] [debug] AMX backtrace:
[13:07:33] [debug] #0 0003f1fc in public J_OnPlayerConnect (938) from GM.amx
[13:07:33] [debug] #1 0003ddfc in public SSCANF_OnPlayerConnect (938) from GM.amx
[13:07:33] [debug] #2 000369f4 in public _y_utils_OnPlayerConnect (938) from GM.amx
[13:07:33] [debug] #3 0001119c in ?? (938, 1, 0, 0, 4, 938, 0, 0, 0, 0, ... <1073741813 arguments>) from GM.amx
[13:07:33] [debug] #4 00014fa0 in public OnPlayerConnect (938) from GM.amx
[13:07:33] [npc:join] Zombie(999) has joined the server (937:127.0.0.1)
[13:07:33] [debug] Run time error 4: "Array index out of bounds"
[13:07:33] [debug] Accessing element at index 937 past array upper bound 99
[13:07:33] [debug] AMX backtrace:
[13:07:33] [debug] #0 0003f1fc in public J_OnPlayerConnect (937) from GM.amx
[13:07:33] [debug] #1 0003ddfc in public SSCANF_OnPlayerConnect (937) from GM.amx
[13:07:33] [debug] #2 000369f4 in public _y_utils_OnPlayerConnect (937) from GM.amx
[13:07:33] [debug] #3 0001119c in ?? (937, 1, 0, 0, 4, 937, 0, 0, 0, 0, ... <1073741813 arguments>) from GM.amx
[13:07:33] [debug] #4 00014fa0 in public OnPlayerConnect (937) from GM.amx
[13:07:33] [npc:join] Zombie(998) has joined the server (936:127.0.0.1)
[13:07:33] [debug] Run time error 4: "Array index out of bounds"
[13:07:33] [debug] Accessing element at index 936 past array upper bound 99
[13:07:33] [debug] AMX backtrace:
[13:07:33] [debug] #0 0003f1fc in public J_OnPlayerConnect (936) from GM.amx
[13:07:33] [debug] #1 0003ddfc in public SSCANF_OnPlayerConnect (936) from GM.amx
[13:07:33] [debug] #2 000369f4 in public _y_utils_OnPlayerConnect (936) from GM.amx
[13:07:33] [debug] #3 0001119c in ?? (936, 1, 0, 0, 4, 936, 0, 0, 0, 0, ... <1073741813 arguments>) from GM.amx
[13:07:33] [debug] #4 00014fa0 in public OnPlayerConnect (936) from GM.amx
PHP Code:
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) return Player[playerid][pLogado] = false, 1;
for(new i = 0; i < 100; i++) SCM(playerid, -1, " ");
LoadPlayerTextDraws(playerid);
SetPlayerColor(playerid, 0xFFFFFFFF);
targetID[playerid] = INVALID_PLAYER_ID;
//Vars reset
Player[playerid][pSlots] = 5;
Player[playerid][pGod] = 0;
Player[playerid][pGodcar] = 0;
Player[playerid][pPassF] = 0;
Player[playerid][pKicked] = 0;
Player[playerid][pLogado] = false;
return 1;
}