public PingKick()
{
if(ServerInfo[MaxPing] != 0)
{
PingPos++; if(PingPos > PING_MAX_EXCEEDS) PingPos = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
Informacion[i][pPing][PingPos] = GetPlayerPing(i);
if(GetPlayerPing(i) > ServerInfo[MaxPing])
{
if(Informacion[i][PingCount] == 0) Informacion[i][PingTime] = TimeStampxd();
Informacion[i][PingCount]++;
if(TimeStampxd() - Informacion[i][PingTime] > PING_TIMELIMIT)
{
Informacion[i][PingTime] = TimeStampxd();
Informacion[i][PingCount] = 1;
}
else if(Informacion[i][PingCount] >= PING_MAX_EXCEEDS)
{
new Sum, x, string[128];
while (x < PING_MAX_EXCEEDS) {
Sum += Informacion[i][pPing][x];
x++;
}
format(string,sizeof(string),"-Fantasilandia- kickeo a %s por exeder el ping maximo de %d de ping.", PlayerName2(i), ServerInfo[MaxPing] );
SendClientMessageToAll(red,string);
TogglePlayerControllable(i,false);
TextDrawShowForPlayer(i, FondoNegro);
new wea[500];
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(i, PlayerName, MAX_PLAYER_NAME);
new year,month,day; getdate(year, month, day);
new hour,minute,second; gettime(hour,minute,second);
format(wea,sizeof(wea),"{FFFFFF}Disculpa %s, tu has sido Kickeado del servidor!\
\n\n{FFFFFF}Admin: Fantasilandia\
\n{FFFFFF}Razon: Tienes %d de ping y lo maximo es %d.\
\n{FFFFFF}Fecha: %i/%i/%i Hora: %i:%i :%i\
\n\n{FFFFFF}* Porfavor cancela las descargas y vuelve a entrar.",PlayerName,GetPlayerPing(i),ServerInfo[MaxPing], day,month,year, hour, minute, second);
ShowPlayerDialog(i, 8000, DIALOG_STYLE_MSGBOX, " * ", wea, "OK", "");
for(new p = 0; p < MAX_PLAYERS; p++) {
if(IsPlayerConnected(p)) {
PlayerPlaySound(p,1140,0.0,0.0,0.0);}}
Kick(i);
}
}
}
}
public PingKick()
{
if(ServerInfo[MaxPing] != 0)
{
if(++PingPos >= PING_MAX_EXCEEDS) PingPos = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
Informacion[i][pPing][PingPos] = GetPlayerPing(i);
if(GetPlayerPing(i) > ServerInfo[MaxPing])
{
if(Informacion[i][PingCount] == 0) Informacion[i][PingTime] = TimeStampxd();
Informacion[i][PingCount]++;
if(TimeStampxd() - Informacion[i][PingTime] > PING_TIMELIMIT)
{
Informacion[i][PingTime] = TimeStampxd();
Informacion[i][PingCount] = 1;
}
else if(Informacion[i][PingCount] >= PING_MAX_EXCEEDS)
{
new Sum, x, string[128];
while (x < PING_MAX_EXCEEDS) {
Sum += Informacion[i][pPing][x];
x++;
}
format(string,sizeof(string),"-Fantasilandia- kickeo a %s por exeder el ping maximo de %d de ping.", PlayerName2(i), ServerInfo[MaxPing] );
SendClientMessageToAll(red,string);
TogglePlayerControllable(i,false);
TextDrawShowForPlayer(i, FondoNegro);
new wea[500];
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(i, PlayerName, MAX_PLAYER_NAME);
new year,month,day; getdate(year, month, day);
new hour,minute,second; gettime(hour,minute,second);
format(wea,sizeof(wea),"{FFFFFF}Disculpa %s, tu has sido Kickeado del servidor!\
\n\n{FFFFFF}Admin: Fantasilandia\
\n{FFFFFF}Razon: Tienes %d de ping y lo maximo es %d.\
\n{FFFFFF}Fecha: %i/%i/%i Hora: %i:%i :%i\
\n\n{FFFFFF}* Porfavor cancela las descargas y vuelve a entrar.",PlayerName,GetPlayerPing(i),ServerInfo[MaxPing], day,month,year, hour, minute, second);
ShowPlayerDialog(i, 8000, DIALOG_STYLE_MSGBOX, " * ", wea, "OK", "");
for(new p = 0; p < MAX_PLAYERS; p++) {
if(IsPlayerConnected(p)) {
PlayerPlaySound(p,1140,0.0,0.0,0.0);}}
Kick(i);
}
}
}
}
Plugin succesfully loaded (version 3.1.3) gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds".
Try this.
I was same problem. I changed 5th line. pawn Код:
|
the waring is ubicated in crashdetect.log Not in compile
Код:
Plugin succesfully loaded (version 3.1.3) gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of PingKick: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". |
[00:36:15] []: During execution of CheckIRCCommand: [00:36:15] []: Run time error 4: "Array index out of bounds" |
Still getting these - no file info & no line info.. after a few moments the server crashed & crashdetect did not output any crash info (but i ran GDB so i have a full backtrace but it doesn't tell me what exactly crashed it)
|
It's not incogito's irc plugin, it's a heavily improved & secured php "delvor bot" text based system without any plugin.
|
Plugin succesfully loaded (version 3.1.3) gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". Exit Plugin succesfully loaded (version 3.1.3) gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". Exit Plugin succesfully loaded (version 3.1.3) Plugin unloaded Plugin succesfully loaded (version 3.1.3) Plugin unloaded Plugin succesfully loaded (version 3.1.3) Plugin unloaded Plugin succesfully loaded (version 3.1.3) Plugin succesfully loaded (version 3.1.3) Plugin unloaded Plugin unloaded Plugin succesfully loaded (version 3.1.3) Plugin succesfully loaded (version 3.1.3) Plugin unloaded Plugin succesfully loaded (version 3.1.3) gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". gamemodes\FTS.amx: During execution of CDI_OnPlayerDeath: gamemodes\FTS.amx: Run time error 4: "Array index out of bounds". Plugin unloaded Plugin succesfully loaded (version 3.1.3) Plugin unloaded Plugin succesfully loaded (version 3.1.3)
#if defined _cdi_included
#endinput
#endif
#define _cdi_included
#include <a_samp>
/*
native ChangeDeathInfo(playerid, killerid, reason, delay=30000);
native ResetDeathInfo(playerid);
*/
stock ChangeDeathInfo(playerid, killerid, reason, delay=30000)
{
if(IsPlayerConnected(playerid))
{
SetPVarInt(playerid, "CDI_DeathReason", reason);
SetPVarInt(playerid, "CDI_Killer", killerid);
SetPVarInt(playerid, "CDI_Changed", GetTickCount());
SetPVarInt(playerid, "CDI_ChangeDelay", delay);
return 1;
}
return 0;
}
stock ResetDeathInfo(playerid)
{
if(IsPlayerConnected(playerid))
{
SetPVarInt(playerid, "CDI_DeathReason", 255);
SetPVarInt(playerid, "CDI_Killer", INVALID_PLAYER_ID);
SetPVarInt(playerid, "CDI_Changed", GetTickCount());
SetPVarInt(playerid, "CDI_ChangeDelay", 0);
return 1;
}
return 0;
}
public OnPlayerSpawn(playerid)
{
ResetDeathInfo(playerid);
return CallLocalFunction("CDI_OnPlayerSpawn", "i", playerid);
}
#if defined _ALS_OnPlayerSpawn
#undef OnPlayerSpawn
#else
#define _ALS_OnPlayerSpawn
#endif
#define OnPlayerSpawn CDI_OnPlayerSpawn
forward CDI_OnPlayerSpawn(playerid);
public OnPlayerDeath(playerid, killerid, reason)
{
if((GetPVarInt(playerid, "CDI_DeathReason") == 255 && !IsPlayerConnected(GetPVarInt(playerid, "CDI_Killer"))) || (GetTickCount() - GetPVarInt(playerid, "CDI_Changed")) > GetPVarInt(playerid, "CDI_ChangeDelay"))
return CallLocalFunction("CDI_OnPlayerDeath", "iii", playerid, killerid, reason);
return CallLocalFunction("CDI_OnPlayerDeath", "iii", playerid, GetPVarInt(playerid, "CDI_Killer"), GetPVarInt(playerid, "CDI_DeathReason"));
}
#if defined _ALS_OnPlayerDeath
#undef OnPlayerDeath
#else
#define _ALS_OnPlayerDeath
#endif
#define OnPlayerDeath CDI_OnPlayerDeath
forward CDI_OnPlayerDeath(playerid, killerid, reason);
Still getting these - no file info & no line info.. after a few moments the server crashed & crashdetect did not output any crash info (but i ran GDB so i have a full backtrace but it doesn't tell me what exactly crashed it)
|
Wahts is the error ?
Код:
... pawn Код:
|
I don't know if my problem is the same as yours, but my server will crash when there's run-time error, and no stack trace is shown.
|
echo 0 | gdb -batch-silent -ex "run" -ex "set logging overwrite on" -ex "set logging file gdb.bt" -ex "set logging on" -ex "set pagination off" -ex "handle SIG33 pass nostop noprint" -ex "echo backtrace:\n" -ex "backtrace full" -ex "echo \n\nregisters:\n" -ex "info registers" -ex "echo \n\ncurrent instructions:\n" -ex "x/16i \$pc" -ex "echo \n\nthreads backtrace:\n" -ex "thread apply all backtrace" -ex "set logging off" -ex "quit" samp03svr date >> crash.log cat gdb.bt >> crash.log
Could not open file
I get this in my crash log quite a lot, and no info after a crash:
Код:
Could not open file |
Could not open file The server has crashed due to an unexpected error.
Run time error 4: "Array index out of bounds" Array max index is 211 but accessing an element at -400
modelid = GetVehicleModel(GetPlayerVehicleID(playerid))-400;
format(vehstr,sizeof(vehstr),"~w~~>~%s",VehicleInfo[modelid][vNAME]);
During execution of OnPlayerCommandText(): Run time error 5: "Invalid memory access" Additional information: No details available
if(IsPlayerInAnyVehicle(playerid)) {