15.03.2014, 13:31
Hello, so i have a problem with mah server, when ever someone do 5 spree server crashes
Crash Report
public ShowInformationTxt(playerid)
public OnPlayerDeath
Crash Report
Код:
[09:13:40] [debug] Run time error 4: "Array index out of bounds" [09:13:40] [debug] Accessing element at index 65535 past array upper bound 499 [09:13:40] [debug] AMX backtrace: [09:13:40] [debug] #0 0005eaa8 in public ShowInformationTxt (0x0000ffff) from Administracion.amx [09:13:40] [debug] #1 00055b4c in public OnPlayerDeath (0x00000011, 0x0000ffff, 0x00000036) from Administracion.amx[09:12:09] [debug] Run time error 4: "Array index out of bounds" [09:12:09] [debug] Accessing element at negative index -1 [09:12:09] [debug] AMX backtrace: [09:12:09] [debug] #0 000f02fc in public OnDialogResponse (0x00000004, 0x0000000c, 0x00000001, 0xffffffff, 0x0012a2c0) from DL.amx
Код:
public ShowInformationTxt(playerid) { new rango[24], status[256]; if((PlayerInfo[playerid][Kills]>= 0 && PlayerInfo[playerid][Kills] <= 350)) { rango = "Noob"; } else if((PlayerInfo[playerid][Kills]>= 501 && PlayerInfo[playerid][Kills] <= 500)) { rango = "Semi-Novato"; } else if((PlayerInfo[playerid][Kills]>= 801 && PlayerInfo[playerid][Kills] <= 900)) { rango = "Sicario"; } else if((PlayerInfo[playerid][Kills]>= 3201 && PlayerInfo[playerid][Kills] <= 1200)) { rango = "Basico"; } else if((PlayerInfo[playerid][Kills]>= 5501 && PlayerInfo[playerid][Kills] <= 1350)) { rango = "criminal"; } else if((PlayerInfo[playerid][Kills]>= 8001 && PlayerInfo[playerid][Kills] <= 1500)) { rango = "Ganster"; } else if((PlayerInfo[playerid][Kills]>= 10501 && PlayerInfo[playerid][Kills] <= 2000)) { rango = "Usuario-Profesional"; } else if((PlayerInfo[playerid][Kills]>= 15001 && PlayerInfo[playerid][Kills] <= 2500)) { rango = "terruco"; } else if((PlayerInfo[playerid][Kills]>= 18501 && PlayerInfo[playerid][Kills] <= 3000)) { rango = "capo"; } else if((PlayerInfo[playerid][Kills]>= 23001 && PlayerInfo[playerid][Kills] <= 3500)) { rango = "Super-Capo"; } else if((PlayerInfo[playerid][Kills]>= 28501 && PlayerInfo[playerid][Kills] <= 3800)) { rango = "Semi-pro"; } else if((PlayerInfo[playerid][Kills]>= 34001 && PlayerInfo[playerid][Kills] <= 4100)) { rango = "Super-pro"; } else if((PlayerInfo[playerid][Kills]>= 37501 && PlayerInfo[playerid][Kills] <= 4500)) { rango = "Elite"; } else if((PlayerInfo[playerid][Kills]>= 40001 && PlayerInfo[playerid][Kills] <= 5000)) { rango = "Elite-DL"; } else if((PlayerInfo[playerid][Kills]>= 47501 && PlayerInfo[playerid][Kills] <= 10000)) { rango = "Amo-DL"; } else if((PlayerInfo[playerid][Kills]>= 56001 && PlayerInfo[playerid][Kills] <= 500000)) { rango = "Usuario-Estrella-DL"; } else if((PlayerInfo[playerid][Kills]>= 60501 && PlayerInfo[playerid][Kills] <= 10000000)) { rango = "Usuario-Dios-DL"; } format(status,sizeof(status),"~r~~h~~h~fr score: ~w~%d ~y~- ~g~~h~~h~dm score: ~w~%d ~y~- ~y~race score: ~w~%d ~y~- ~p~~h~duelo score: ~w~%d ~y~- ~b~~h~~h~Vip score: ~w~%d",PlayerInfo[playerid][Kills],PlayerInfo[playerid][Experiencia],PlayerInfo[playerid][Racescore],PlayerInfo[playerid][Dwin],PlayerInfo[playerid][Eventscore]); TextDrawSetString(Information[playerid],status); }
Код:
public OnPlayerDeath(playerid, killerid, reason) { //----------------------------- [ anti fake kill ] ---------------------------// antifakekill[playerid] ++; SetTimerEx("antifakekill2", 1000,false,"i",playerid); //-------------------------- [ bomba nuclear vip ] ---------------------------// if(BuscadoPorNuclear[playerid]==1) { HanDesactivadaoLaBomba[playerid]=1; } //---------------------------------- [ configuracion ] -----------------------// BoCmd4[playerid] = 0; BoCmd5[playerid] = 0; poderesenauto[playerid] = 0; TextDrawHideForPlayer(playerid,HAYTD[playerid]); JoinedHay[playerid] = 0; modoheno[playerid] = 0; scoreheno[playerid] = 0; tiempohen[playerid] = 0; //---------------------------------- [ heno ] --------------------------------// if(BoCmd3[playerid] == 1) { BoCmd3[playerid] = 0; SetPlayerScore(playerid,GetPlayerScore(playerid)-100); PlayerInfo[playerid][Kills] = GetPlayerScore(playerid); GameTextForPlayer(playerid,"~g~~H~PERDISTE ~w~100 DE SCORE ~g~POR MORIR~n~~w~EN HENO", 3000, 3); } //--------------------------- [ evento ] -------------------------------------// if(TaNoEvento[playerid]) { TaNoEvento[playerid] = false; } if(GetVehicleModel(Cars[playerid])) { DestroyVehicle(Cars[playerid]); } //------------------------------ [ aquaman ] ---------------------------------// new strs[128]; if(Minigamer_{playerid} == true) { if(inProgress > 1) { format(strs,sizeof(strs),"*"VERDECLARO"%s "BLAN"ha abandonado "ROJOS"aquaman"AZULES" minijuego, "ROJOS"clasificar %d",PlayerName2(playerid),Iter_Count(_Minigamer)); SendClientMessageToAll(LIME,strs); Iter_Remove(_Minigamer,playerid); Minigamer_{playerid} = false; if(Iter_Count(_Minigamer) < 2) { foreach(_Minigamer,i)MinigameWinner(i); } } else { SendClientMessage(playerid,LIME,""BLAN"Tu entrada para "ROJOS"aquaman"BLAN" minijuego ha sido cancelada." ); Iter_Remove(_Minigamer,playerid); Minigamer_{playerid} = false; } } //------------------------------- [ lspec ] ----------------------------------// for(new x=0; x<MAX_PLAYERS; x++) if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid) AdvanceSpectate(x); //------------------------------- [ flecha ] ---------------------------------// if(Empezado == 1) { if(killerid != INVALID_PLAYER_ID && playerid == Portador) { AttachObjectToPlayer(Flecha, killerid, 0, 0, 2, 0, 0, 0); Portador = killerid; GameTextForPlayer(killerid,"~g~~H~GANASTE ~w~20 DE SCORE ~g~POR MATAR~n~~w~AL PORTADOR DE LA FLECHA", 3000, 3); SetPlayerScore(killerid,GetPlayerScore(killerid)+20); PlayerInfo[killerid][Kills] = GetPlayerScore(killerid); } else if(killerid == INVALID_PLAYER_ID && playerid == Portador) { Suplantar(); } } //------------------------- [ carreras ] -------------------------------------// if(Joined[playerid] == true) { JoinCount--; Joined[playerid] = false; DestroyVehicle(CreatedRaceVeh[playerid]); DisablePlayerRaceCheckpoint(playerid); TextDrawHideForPlayer(playerid, RaceInfo[playerid]); TextDrawHideForPlayer(playerid, abandonar[playerid]); CPProgess[playerid] = 0; franco[playerid][tirador] = 1; BoCmd[playerid] = 0; KillTimer(InfoTimer[playerid]); #if defined RACE_IN_OTHER_WORLD SetPlayerVirtualWorld(playerid, 0); #endif } if(BuildRace == playerid+1) BuildRace = 0; //------------------------------- [ duelos ] ---------------------------------// if (EnDuelo[playerid] == 1 && EnDuelo[killerid] == 1) { for (new i=1; i<= ARENAS; i++) { if ((Duelos[i][DesaId] == playerid || Duelos[i][DesaId] == killerid) && (Duelos[i][DesafiadoId] == playerid) || (Duelos[i][DesafiadoId] == killerid)) { new str0[128]; format(str0,sizeof(str0),"-|Info|- Haz perdido el duelo contra %s",PlayerName2(killerid)); SendClientMessage(playerid,COLOR_DUELO,str0); format(str0,sizeof(str0),"-|Info|- Haz ganado el duelo contra %s",PlayerName2(playerid)); SendClientMessage(killerid,COLOR_DUELO,str0); SendClientMessage(killerid,COLOR_DUELO,"-|Info|- Ahora estas en las graderias, para volver a tener un duelo usa /duelo invitar."); EnDuelo[playerid] = 0; EnDuelo[killerid] = 0; BoCmd2[playerid] = 0; BoCmd2[killerid] = 0; PlayerInfo[playerid][Bloqueado] = 0; PlayerInfo[killerid][Bloqueado] = 0; PlayerInfo[killerid][Dwin] ++; PlayerInfo[playerid][Dlose] ++; Duelos[i][DesafiadoId] = -1; Duelos[i][DesaId] = -1; Duelos[i][ArmasId] = -1; Duelos[i][Libre] = 0; ShowInformationTxt(killerid); ShowInformationTxt(playerid); switch (i) { case 1: { SetPlayerPos(killerid,2626.5664,1206.4237,28.0004); SetPlayerFacingAngle(killerid,274.9405); SetPlayerVirtualWorld(killerid, 0); } case 2: { SetPlayerPos(killerid,-1562.8058,310.9799,53.4609); SetPlayerFacingAngle(killerid,278.5559); SetPlayerVirtualWorld(killerid, 0); } case 3: { SetPlayerPos(killerid,-2030.9362,-425.7924,71.554); SetPlayerFacingAngle(killerid,145.0746); SetPlayerVirtualWorld(killerid, 0); GivePlayerWeapon(playerid,46,1); } case 4: { SetPlayerPos(killerid,2792.4976,-1455.7574,40.048); SetPlayerFacingAngle(killerid,353.4433); SetPlayerVirtualWorld(killerid, 0); } } for (new j=0; j<= MAX_PLAYERS; j++) { if (ViendoDuelo[j] == i) { new str20[256]; format(str20,sizeof(str20),"~r~%s ~w~es el ganador del duelo",PlayerName2(killerid)); GameTextForPlayer(j,str20,5000,0); ViendoDuelo[j] =-1; SetPlayerVirtualWorld(j, 0); } } return 1; } } } if (EnDuelo[playerid] == 1 && EnDuelo[killerid] == 0) { } //--------------------------------- [ hitman ] -------------------------------// new playercash; new ajustshit[256]; new killedplayer[MAX_PLAYER_NAME]; if(killerid == INVALID_PLAYER_ID) { } else { if(bounty[playerid] > 0) { GetPlayerName(playerid, killedplayer, sizeof(killedplayer)); format(ajustshit, sizeof(ajustshit), "Has recibido una recompensa de %d de score por matar a %s.", bounty[playerid], killedplayer); SendClientMessage(killerid, COLOR_YELLOW, ajustshit); SetPlayerScore(killerid,GetPlayerScore(killerid)+bounty[playerid]); PlayerInfo[killerid][Kills] = GetPlayerScore(killerid); if(PlayerInfo[killerid][LoggedIn] == 1) { GuardarDatos(killerid); SetPlayerVip(killerid); SetPlayerVip2(killerid); } ShowInformationTxt(killerid); bounty[playerid] = 0; } if(playercash > 0) { SetPlayerScore(killerid,GetPlayerScore(killerid)+playercash); PlayerInfo[killerid][Kills] = GetPlayerScore(killerid); if(PlayerInfo[killerid][LoggedIn] == 1) { GuardarDatos(killerid); SetPlayerVip(killerid); SetPlayerVip2(killerid); } ShowInformationTxt(killerid); } } if(playercash > 0) { ResetPlayerMoney(playerid); } //------------------------------- [ stats ] ----------------------------------// SetPlayerScore(killerid,GetPlayerScore(killerid)+1); PlayerInfo[killerid][Kills] = GetPlayerScore(killerid); SetPlayerScore(playerid,GetPlayerScore(playerid)-1); PlayerInfo[playerid][Kills] = GetPlayerScore(playerid); PlayerInfo[playerid][Deaths]++; if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID) { if(GetPlayerWeapon(killerid) == 34){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+5;} if(GetPlayerWeapon(killerid) == 33){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+4;} if(GetPlayerWeapon(killerid) == 32){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+2;} if(GetPlayerWeapon(killerid) == 30){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+3;} if(GetPlayerWeapon(killerid) == 31){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+3;} if(GetPlayerWeapon(killerid) == 29){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+3;} if(GetPlayerWeapon(killerid) == 28){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+2;} if(GetPlayerWeapon(killerid) == 27){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+4;} if(GetPlayerWeapon(killerid) == 26){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+2;} if(GetPlayerWeapon(killerid) == 25){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+5;} if(GetPlayerWeapon(killerid) == 24){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+4;} if(GetPlayerWeapon(killerid) == 23){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+3;} if(GetPlayerWeapon(killerid) == 22){PlayerInfo[killerid][Experiencia]=PlayerInfo[killerid][Experiencia]+3;} } ShowInformationTxt(playerid); ShowInformationTxt(killerid); if(PlayerInfo[playerid][LoggedIn] == 1) { GuardarDatos(playerid); SetPlayerVip(playerid); SetPlayerVip2(playerid); } if(PlayerInfo[killerid][LoggedIn] == 1) { GuardarDatos(killerid); SetPlayerVip(killerid); SetPlayerVip2(killerid); } return 1; }