Jump to content
BFACP & ProCon Plugin Development Has Moved to Metabans ×

Chat, GUID, Stats and Mapstats Logger [1.0.0.3]


ColColonCleaner

Recommended Posts

if you need a query for it. here it is :-

 

sum(Score),sum(Kills),sum(Headshots),sum(Deaths),sum(TKs),sum(Suicide),sum(RoundCount),sum(Playtime),max(Killstreak),max(Deathstreak),max(HighScore),sum(Wins),sum(Losses) FROM `tbl_sessions` ts

inner join tbl_server_player sp on ts.StatsID=sp.StatsID

inner join tbl_playerdata pd on sp.PlayerID= pd.PlayerID

where pd.SoldierName = 'Doc-Ice-Elm' and YEAR(ts.EndTime) = 2018 AND MONTH(ts.EndTime) = 6

 

make sure sessions is enabled in the plugin options for this to work.

Link to comment
  • 2 weeks later...
  • 1 month later...

Hello, I can't connect my bf3 server to my database, I tried with the main user and by creating another user, my logs are good since the test database that is given with "BF3 Stats Page by Ty_ger07".

 

This is the Error debug:

 

[01:17:21:21 52] Error in Tablebuilder:

[01:17:21:21 52] Message: Unable to connect to any of the specified MySQL hosts.

[01:17:21:21 52] Native: -2147467259 [01:17:21:21 52] Source: MySql.Data

 

[01:17:21:21 52] StackTrace: at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.Driver.Open() at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at PRoConEvents.CChatGUIDStatsLogger.tablebuilder()

 

[01:17:21:21 52] Error: System.NullReferenceException: Object reference not set to an instance of an object. at PRoConEvents.CChatGUIDStatsLogger.DisplayMySqlErrorCollection(MySqlException myException) at PRoConEvents.CChatGUIDStatsLogger.tablebuilder()

 

[01:17:22:52] [statslogger]Error: getUpdateServerID1: MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.Driver.Open() at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at PRoConEvents.CChatGUIDStatsLogger.getUpdateServerID(CServerInfo csiServerInfo) Translated with www.DeepL.com/Translator

Link to comment
  • Administrators

Hello, I can't connect my bf3 server to my database, I tried with the main user and by creating another user, my logs are good since the test database that is given with "BF3 Stats Page by Ty_ger07".

 

This is the Error debug:

 

[01:17:21:21 52] Error in Tablebuilder:

[01:17:21:21 52] Message: Unable to connect to any of the specified MySQL hosts.

[01:17:21:21 52] Native: -2147467259 [01:17:21:21 52] Source: MySql.Data

 

[01:17:21:21 52] StackTrace: at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.Driver.Open() at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at PRoConEvents.CChatGUIDStatsLogger.tablebuilder()

 

[01:17:21:21 52] Error: System.NullReferenceException: Object reference not set to an instance of an object. at PRoConEvents.CChatGUIDStatsLogger.DisplayMySqlErrorCollection(MySqlException myException) at PRoConEvents.CChatGUIDStatsLogger.tablebuilder()

 

[01:17:22:52] [statslogger]Error: getUpdateServerID1: MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.Driver.Open() at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at PRoConEvents.CChatGUIDStatsLogger.getUpdateServerID(CServerInfo csiServerInfo) Translated with www.DeepL.com/Translator

 

Only thing I can suggest is to make sure the creds are correct and the host ip and host port are set correctly for your specific mysql server. Also make sure the firewall didn't block your mysql connection. Can also try restarting procon itself and check if that clears it up.

The developer of the Battlefield Admin Control Panel (BFACP)

For BFACP support please post in the BFACP topic linked above.

Do not contact me via PM on the forums for help with procon. Please make a topic for it. Only PM's I will accept will revolve around any website issues.

spacer.png

Link to comment

The top 20 is basically refreshed every week, is it possible to change it to be refreshed month by month?
 

if so, I think I found the line of code, is that it?

// initialize timestamp values
$now_timestamp = time();
$old = $now_timestamp - 10800;
if($rank == 'SoldierName')

If that's it, what value should I put?

 

Thank you all for your help :happy:

Edited by DonFuZi0N
Link to comment
  • Administrators

The top 20 is basically refreshed every week, is it possible to change it to be refreshed month by month?

 

if so, I think I found the line of code, is that it?

// initialize timestamp values
$now_timestamp = time();
$old = $now_timestamp - 10800;
if($rank == 'SoldierName')

If that's it, what value should I put?

 

Thank you all for your help :happy:

 

 

the line of code I found is in the file "leader-ranks.php" in /common/leaders folder

 

Are you using tygers web stats? If so post that stuff in this thread.

 

https://myrcon.net/topic/166-bf4-stats-webpage-for-xpkillers-stats-logger-plugin/

The developer of the Battlefield Admin Control Panel (BFACP)

For BFACP support please post in the BFACP topic linked above.

Do not contact me via PM on the forums for help with procon. Please make a topic for it. Only PM's I will accept will revolve around any website issues.

spacer.png

Link to comment
  • 2 weeks later...
  • Administrators

Hi,

I it possible to have 2 battlefield servers using the same ID.

I want stats from the 2 servers to update the same totals.

So not sure if it was designed this?

Thanks in advance

 

No it is not possible to have the same server id for different servers.

 

What do you mean by the same totals though? 

The developer of the Battlefield Admin Control Panel (BFACP)

For BFACP support please post in the BFACP topic linked above.

Do not contact me via PM on the forums for help with procon. Please make a topic for it. Only PM's I will accept will revolve around any website issues.

spacer.png

Link to comment

If I have 2 servers, I want the leader board, top 10 etc to be a combination from the 2 servers.

I have had one server running for ages with lots of stats and a new server.

I have both servers running.

- Server 1 is on server group 0 (has all the stats)

- Server 2 is on server group 1 (new server)

 

I have tried turning on the overall ranking(merged server ranking)

This show the score, kills, deaths etc from server 1 on server 2 when you type !rank, but the actual ranking doesnt change.  The ranking still seems to be on the actual kills etc from server 2.

Hope that makes sense.

Link to comment
  • Administrators

 

 

I have had one server running for ages with lots of stats and a new server.

I have both servers running.

- Server 1 is on server group 0 (has all the stats)

- Server 2 is on server group 1 (new server)

 

I have tried turning on the overall ranking(merged server ranking)

This show the score, kills, deaths etc from server 1 on server 2 when you type !rank, but the actual ranking doesnt change. The ranking still seems to be on the actual kills etc from server 2.

Hope that makes sense.

Set the server group on server 2 to zero so it matches server 1. If I remember correctly server group determines what gets calculated. It's been a while though so not 100% sure. However, if that doesn't work, then I don't think it's possible without code change in the plugin.

 

Sent from my ONEPLUS A5010 using Tapatalk

The developer of the Battlefield Admin Control Panel (BFACP)

For BFACP support please post in the BFACP topic linked above.

Do not contact me via PM on the forums for help with procon. Please make a topic for it. Only PM's I will accept will revolve around any website issues.

spacer.png

Link to comment
  • 4 weeks later...

Receiving this error.

Using MySQL 8.0.

 

[Statslogger]Error: SQLQuery:
[09:18:07 94] Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank, (SELECT tss.CountPlayers FROM tbl_server_stats tss WHERE ServerID = 1 ) AS' at line 1
[09:18:07 94] Native: -2147467259
[09:18:07 94] Source: MySql.Data
[09:18:07 94] StackTrace:    at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   at PRoConEvents.CChatGUIDStatsLogger.SQLquery(MySqlCommand selectQuery)
[09:18:07 94] [Statslogger]Error: SQLQuery OuterException:System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.CChatGUIDStatsLogger.DisplayMySqlErrorCollection(MySqlException myException)
   at PRoConEvents.CChatGUIDStatsLogger.SQLquery(MySqlCommand selectQuery)
 

Any help appreciated.

Link to comment
  • Administrators
Receiving this error.
Using MySQL 8.0.
 
[statslogger]Error: SQLQuery:
[09:18:07 94] Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank, (SELECT tss.CountPlayers FROM tbl_server_stats tss WHERE ServerID = 1 ) AS' at line 1
[09:18:07 94] Native: -2147467259
[09:18:07 94] Source: MySql.Data
[09:18:07 94] StackTrace:    at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   at PRoConEvents.CChatGUIDStatsLogger.SQLquery(MySqlCommand selectQuery)
[09:18:07 94] [statslogger]Error: SQLQuery OuterException:System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.CChatGUIDStatsLogger.DisplayMySqlErrorCollection(MySqlException myException)
   at PRoConEvents.CChatGUIDStatsLogger.SQLquery(MySqlCommand selectQuery)
 
Any help appreciated.
It hasn't been tested on mysql 8 so I would recommend using an older version of mysql or Maria db for the time being.
Danny, not sure what the problem is as I dont have alot of experience with all of it, but I seen Tyger07 made some changes to one of the plugins to fix issues he was having with MySQL version 5.7.3 m13 and up. You might try this one and see if it helps.  https://github.com/tyger07/CChatGUIDStatsLogger-1.0.0.2-ty_gerMOD
Those changes are in the latest version here. They were merged in a long time ago.

Sent from my ONEPLUS A5010 using Tapatalk

The developer of the Battlefield Admin Control Panel (BFACP)

For BFACP support please post in the BFACP topic linked above.

Do not contact me via PM on the forums for help with procon. Please make a topic for it. Only PM's I will accept will revolve around any website issues.

spacer.png

Link to comment
16 minutes ago, Prophet731 said:

It hasn't been tested on mysql 8 so I would recommend using an older version of mysql or Maria db for the time being. Those changes are in the latest version here. They were merged in a long time ago.

Sent from my ONEPLUS A5010 using Tapatalk
 

Thanks for the fast replies.

Will give it a go and report back.

Thanks again.

Link to comment

Now using MySQL 5.7 and receiving a different error.

 

 [Statslogger]Error: Error in Startstreaming: 
[12:30:42 57] Message: Cannot add or update a child row: a foreign key constraint fails (`bf4`.`tbl_server_player`, CONSTRAINT `fk_tbl_server_player_tbl_server` FOREIGN KEY (`ServerID`) REFERENCES `tbl_server` (`ServerID`) ON DELETE CASCADE ON UPDATE NO ACTION)
[12:30:42 57] Native: -2147467259
[12:30:42 57] Source: MySql.Data
[12:30:42 57] StackTrace:    at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at PRoConEvents.CChatGUIDStatsLogger.StartStreaming()
[12:30:42 62] [Statslogger]Error: Error in Startstreaming OuterException: System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.CChatGUIDStatsLogger.DisplayMySqlErrorCollection(MySqlException myException)
   at PRoConEvents.CChatGUIDStatsLogger.StartStreaming()
[12:30:56 08] [Statslogger]Error: getUpdateServerID1: System.InvalidOperationException: Nested transactions are not supported.
   at MySql.Data.MySqlClient.ExceptionInterceptor.Throw(Exception exception)
   at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction(IsolationLevel iso)
   at PRoConEvents.CChatGUIDStatsLogger.getUpdateServerID(CServerInfo csiServerInfo)
 

Thoughts?

Link to comment
  • Administrators
Now using MySQL 5.7 and receiving a different error.
 
 [statslogger]Error: Error in Startstreaming: 
[12:30:42 57] Message: Cannot add or update a child row: a foreign key constraint fails (`bf4`.`tbl_server_player`, CONSTRAINT `fk_tbl_server_player_tbl_server` FOREIGN KEY (`ServerID`) REFERENCES `tbl_server` (`ServerID`) ON DELETE CASCADE ON UPDATE NO ACTION)
[12:30:42 57] Native: -2147467259
[12:30:42 57] Source: MySql.Data
[12:30:42 57] StackTrace:    at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at PRoConEvents.CChatGUIDStatsLogger.StartStreaming()
[12:30:42 62] [statslogger]Error: Error in Startstreaming OuterException: System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.CChatGUIDStatsLogger.DisplayMySqlErrorCollection(MySqlException myException)
   at PRoConEvents.CChatGUIDStatsLogger.StartStreaming()
[12:30:56 08] [statslogger]Error: getUpdateServerID1: System.InvalidOperationException: Nested transactions are not supported.
   at MySql.Data.MySqlClient.ExceptionInterceptor.Throw(Exception exception)
   at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction(IsolationLevel iso)
   at PRoConEvents.CChatGUIDStatsLogger.getUpdateServerID(CServerInfo csiServerInfo)
 
Thoughts?
It's trying to create tables that already exist. If you did it on a fresh database it shouldn't have displayed an error. I'll see if I can modify the latest version to catch that error.

Sent from my ONEPLUS A5010 using Tapatalk

The developer of the Battlefield Admin Control Panel (BFACP)

For BFACP support please post in the BFACP topic linked above.

Do not contact me via PM on the forums for help with procon. Please make a topic for it. Only PM's I will accept will revolve around any website issues.

spacer.png

Link to comment

silly question, can i add the table by hand ?

gameservers.com only support ONE free database, and we got that setup.

but when enabling the statslogger it spams this message here.

	[17:31:38 57] Error in Tablebuilder:
[17:31:38 57] Message: Authentication to host '** here was a IP adress **' for user '**  here was the user setings **' using method 'mysql_native_password' failed with message: Access denied for user '**  here was the user setings **' (using password: YES)
[17:31:38 57] Native: -2147467259
[17:31:38 57] Source: MySql.Data
[17:31:38 57] StackTrace:    at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex)
   at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
   at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset)
   at MySql.Data.MySqlClient.NativeDriver.Authenticate(String authMethod, Boolean reset)
   at MySql.Data.MySqlClient.NativeDriver.Open()
   at MySql.Data.MySqlClient.Driver.Open()
   at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
   at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
   at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
   at MySql.Data.MySqlClient.MySqlPool.GetConnection()
   at MySql.Data.MySqlClient.MySqlConnection.Open()
   at PRoConEvents.CChatGUIDStatsLogger.tablebuilder()
[17:31:38 57] InnerException: MySql.Data.MySqlClient.MySqlException (0x80004005): Access denied for user '** yep, here was the user setings **' (using password: YES)
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
[17:31:38 57] Error: System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.CChatGUIDStatsLogger.tablebuilder()
	[18:28:43 18] InnerException: MySql.Data.MySqlClient.MySqlException (0x80004005): Access denied for user '** here was the user settings **'@'%' to database '** the databasename **'
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
[18:28:43 18] Error: System.NullReferenceException: Object reference not set to an instance of an object.
   at PRoConEvents.CChatGUIDStatsLogger.tablebuilder()
	 
	

 

database is working, we got batllelogcache working, so it connect, it only refused to create the tables imho.

cheers, thnsx.

 

Link to comment

Looks like your SQL is still denying access. In order for me to get it to work I had to create an empty database in my cpanel with the database name I was going to use, add my username to have access to that database, then add that info (database name, user, and password) into the plugin and when activated it would populate the whole database with the tables. It wouldnt work without granting the user with permissions access to that database. I dont know if thats the case for you, but I hope that helps.

Edited by Stov3top
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.