20.07.2017, 15:04
Quando vou ligar meu servidor na host da esso erro na log, e o server nгo fica online.
Код:
[11:52:04] [debug] Run time error 4: "Array index out of bounds" [11:52:04] [debug] Accessing element at index 500 past array upper bound 499 [11:52:04] [debug] AMX backtrace: [11:52:04] [debug] #0 00170d54 in public CheckWM () from CMR.amx
Код:
/*============================= Armas Proibida ================================*/ public CheckWM() { for( new i, j = GetMaxPlayers(); i < j; ++i ) { for( new w; w < sizeof(ArmasProibidas); ++w ) { if(Spawnado[i] == false) continue; if(PlayerInfo[i][pLogged] == 1) { if(GetPlayerWeapon(i) == ArmasProibidas[w] && !pAdmin[i]) { GetWeaponName( ArmasProibidas[ w ], wName, sizeof(wName) ); #if ACTION == 0 format(pStr, sizeof(pStr), "| CMR-Admin | O(A) Administrador(a) [L.C]Guardiao baniu o(a) jogador(a) %s ( Motivo: %s )", PlayerName( i ), wName ); BanLog(pStr); SendClientMessageToAll( Vermelho, pStr ); BanEx( i, "Arma Proibida" ); #elseif ACTION == 1 format(pStr, sizeof(pStr), "| CMR-Admin | O Administrador [L.C]Guardiao kickou o(a) jogador(a) %s por usar uma arma proibida. (%s)", PlayerName( i ), wName ); SendClientMessageToAll( Vermelho, pStr ); Kick( i ); #elseif ACTION == 2 format(pStr, sizeof(pStr), " | ANTI - ARMAS | O Jogador %s [ID: %d] tentou usar uma arma proibida e nгo obteve sucesso. (%s)", PlayerName( i ), i, wName ); SendClientMessageToAll( Vermelho, pStr ); RemoveWeaponSlot( i, GetWeaponSlot( ArmasProibidas[ w ] ) ); #endif } } } } return 1; }