SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 16/11/2015, 07:14 PM   #11
Yousha
Banned
 
Join Date: May 2013
Posts: 118
Reputation: 7
Default Re: Rare error..

Quote:
#0 000fb434 in public PingKick ()
Now post PingKick() function for us
Yousha is offline   Reply With Quote
Old 16/11/2015, 07:22 PM   #12
Tixxt
Big Clucker
 
Join Date: Sep 2011
Posts: 162
Reputation: 16
Default Re: Rare error..

How do you mean? Where do i find that?
__________________
Tixxt is offline   Reply With Quote
Old 16/11/2015, 07:28 PM   #13
Calgon
Banned
 
Join Date: Jan 2009
Posts: 6,130
Reputation: 1127
Default Re: Rare error..

Quote:
Originally Posted by Tixxt View Post
How do you mean? Where do i find that?
It's in your gamemode .pwn file.
Calgon is offline   Reply With Quote
Old 16/11/2015, 07:30 PM   #14
Tixxt
Big Clucker
 
Join Date: Sep 2011
Posts: 162
Reputation: 16
Default Re: Rare error..

This is what i can find about that. I never changed this before. And with this script it worked fine untill yesterday.

Code:
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);
				}
			}
		}
	}

	#if defined ANTI_MINIGUN
	new weap, ammo;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && PlayerInfo[i][Level] == 0)
		{
			GetPlayerWeaponData(i, 7, weap, ammo);
			if(ammo > 1 && weap == 38) {
				new string[128]; format(string,sizeof(string),"INFO: %s has a mingun with %d ammo", PlayerName2(i), ammo);
				MessageToAdmins(COLOR_WHITE,string);
			}
		}
	}
	#endif
}

forward GodUpdate();
public GodUpdate()
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && PlayerInfo[i][God] == 1) {
			SetPlayerHealth(i,100000);
			RepairVehicle(GetPlayerVehicleID(i));
			SetVehicleHealth(GetPlayerVehicleID(i),1000000.0);
		}
	}
}
Some more error log :

Code:
[21:37:19] [join] QualickDamage has joined the server (0:24.133.203.91)
[21:37:19]  {0DFF2D}QualickDamage {FF0000}has joined the {14FF34}Unreal FreeRoam [ Country:  | IP Address: ******* | Ping: 174 ]
[21:37:26] [debug] Run time error 4: "Array index out of bounds"
[21:37:26] [debug]  Accessing element at index 4 past array upper bound 3
[21:37:26] [debug] AMX backtrace:
[21:37:26] [debug] #0 000fb434 in public PingKick () from NRG[V.4.0].amx
[21:37:26] [part] QualickDamage has left the server (0:2)
[21:38:22] [debug] Run time error 4: "Array index out of bounds"
[21:38:22] [debug]  Accessing element at index 4 past array upper bound 3
[21:38:22] [debug] AMX backtrace:
[21:38:22] [debug] #0 000fb434 in public PingKick () from NRG[V.4.0].amx
[21:39:19] [debug] Run time error 4: "Array index out of bounds"
[21:39:19] [debug]  Accessing element at index 4 past array upper bound 3
[21:39:19] [debug] AMX backtrace:
[21:39:19] [debug] #0 000fb434 in public PingKick () from NRG[V.4.0].amx
__________________
Tixxt is offline   Reply With Quote
Old 16/11/2015, 08:29 PM   #15
Tixxt
Big Clucker
 
Join Date: Sep 2011
Posts: 162
Reputation: 16
Default Re: Rare error..

Help?
__________________
Tixxt is offline   Reply With Quote
Old 16/11/2015, 08:42 PM   #16
Yousha
Banned
 
Join Date: May 2013
Posts: 118
Reputation: 7
Default Re: Rare error..

Well, couldnt find anything bad...
Try to comment some codes in that function, to find the location of that warning
Then recompile and test it...


For example comment WHOLE this code:
Code:
				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);
				}
Yousha is offline   Reply With Quote
Old 16/11/2015, 08:47 PM   #17
Tixxt
Big Clucker
 
Join Date: Sep 2011
Posts: 162
Reputation: 16
Default Re: Rare error..

Its weird cuz it looks like its not my gm? Cuz when i run the gm on my localhost it works fine? And i can logon just fine.
__________________
Tixxt is offline   Reply With Quote
Old 16/11/2015, 09:07 PM   #18
Yousha
Banned
 
Join Date: May 2013
Posts: 118
Reputation: 7
Default Re: Rare error..

lol, one question!

What is this NRG[V].amx(in your server.cfg) and NRG[V.4.0].amx (in your error log) ?
2x GMs... ?
Yousha is offline   Reply With Quote
Old 16/11/2015, 09:37 PM   #19
Tixxt
Big Clucker
 
Join Date: Sep 2011
Posts: 162
Reputation: 16
Default Re: Rare error..

No in the cfg is cuz i eddited. The one in my error log is also my gm so just one. Do you thjnk this problem is fixble or is my vps done?
__________________
Tixxt is offline   Reply With Quote
Old 16/11/2015, 09:53 PM   #20
XBrianX
Huge Clucker
 
Join Date: May 2015
Location: Dubai
Posts: 456
Reputation: 75
Default Re: Rare error..

Quote:
Originally Posted by Tixxt View Post
No in the cfg is cuz i eddited. The one in my error log is also my gm so just one. Do you thjnk this problem is fixble or is my vps done?
I know this may sound stupid but have you tried removing Pingkick thingy from your gamemode?
__________________

XBrianX is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rare bug exclide1 Scripting Help 3 02/08/2013 11:58 AM
A Rare Error [TDL]OGLoc Help Archive 9 10/01/2011 12:13 AM
[HELP] Rare Error justino Help Archive 5 30/11/2010 12:14 PM


All times are GMT. The time now is 10:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.