Server getting shut down itself [REPOST] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server getting shut down itself [REPOST] (
/showthread.php?tid=550925)
Server getting shut down itself [REPOST] -
rockerman - 15.12.2014
<Removed>
Problem Solved!
Re: Server getting shut down itself [REPOST] -
rockerman - 16.12.2014
BUMP Pls anyone help!
Re: Server getting shut down itself [REPOST] -
CalvinC - 16.12.2014
Sorry i cannot help with fixing it, but you might be able to remove the Pingkick script to fix it temporarily?
Re: Server getting shut down itself [REPOST] -
AdytzaSS - 16.12.2014
Recompile your GM with -d3. In you pawno folder make a file ( pawn.cfg) and in this file type -d3, save it. Then recompile your GameMode , you will see that in debug mode will show you the exact line of your problem.
Re: Server getting shut down itself [REPOST] -
Banana_Ghost - 16.12.2014
Post the code from PingKick().
Re: Server getting shut down itself [REPOST] -
rockerman - 16.12.2014
Quote:
Originally Posted by Banana_Ghost
Post the code from PingKick().
|
Код:
forward PingKick();
public PingKick()
{
if(ServerInfo[MaxPing] != 0)
{
PingPos++; if(PingPos > PING_MAX_EXCEEDS) PingPos = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
PlayerInfo[i][pPing][PingPos] = GetPlayerPing(i);
if(GetPlayerPing(i) > ServerInfo[MaxPing])
{
if(PlayerInfo[i][PingCount] == 0) PlayerInfo[i][PingTime] = TimeStamp();
PlayerInfo[i][PingCount]++;
if(TimeStamp() - PlayerInfo[i][PingTime] > PING_TIMELIMIT)
{
PlayerInfo[i][PingTime] = TimeStamp();
PlayerInfo[i][PingCount] = 1;
}
else if(PlayerInfo[i][PingCount] >= PING_MAX_EXCEEDS)
{
new Sum, Average, x, string[128];
while (x < PING_MAX_EXCEEDS) {
Sum += PlayerInfo[i][pPing][x];
x++;
}
Average = (Sum / PING_MAX_EXCEEDS);
format(string,sizeof(string),"%s has been kicked from the server. (Reason: High Ping (%d) | Average (%d) | Max Allowed (%d) )", PlayerName2(i), GetPlayerPing(i), Average, ServerInfo[MaxPing] );
SendClientMessageToAll(grey,string);
SaveToFile("KickLog",string);
Kick(i);
}
}
}
}
Re: Server getting shut down itself [REPOST] -
rockerman - 16.12.2014
BUMP
Re: Server getting shut down itself [REPOST] -
rockerman - 16.12.2014
Bump!!
Re: Server getting shut down itself [REPOST] -
Divergent - 16.12.2014
I don't see any arrays that are out of bounds. Install nativechecker see if you can get any further information from there.
Re: Server getting shut down itself [REPOST] -
dominik523 - 16.12.2014
It's either PingPos or PingCount I think
By the way, that code looks really awful.