Player Ranks

Player ranks and stats database

Total Downloads: 4,908 - First Release: Mar 4, 2017 - Last Update: May 29, 2018

5/5, 19 likes
  1. Code:
    (02:55:12) | [Oxide] 02:55 [Error] Failed to call hook 'OnLootEntity' on plugin 'PlayerRanks v1.2.9' (NullReferenceException: Object reference not set to an instance of an object)
    (02:55:12) | [Oxide] 02:55 [Stacktrace]   at Oxide.Plugins.PlayerRanks.OnLootEntity (.BasePlayer player, .BaseEntity entity) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayerRanks.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  2. @MeatCircus Can you tell me something about the context?
     
  3. I have an update to push which calculates APC kills by damage rather than hits.
    It also makes a single c4 count as a hit and a kill.

    If you can give me any info surrounding that error i'll look into it before the update. @MeatCircus

    Also, normal bullets can be made to not count as hits on APC.
    They don't do damage, but they do get the APC interested in you so I'm easy either way - Cast your votes folks! :)
     
  4. Srry really don't know much about what went on, just saw it in my rcon console. I don't actually play anymore so mostly on rcon a lot.
     
  5. *SQL performance issues are being address. Update to follow.
     
  6. Steenamaroo updated Player Ranks with a new update entry:

    1.3.0

     
  7. I'm not sure if this is PR related or EMSQL or if it's just a timeout / borked one off connection issue but got this in console after updating both PR & EMSQL this morning:

    Code:
    (10:21:28) | [PlayerRanks] Player Ranks MySQL Database Was Saved.
    (10:21:59) | [PlayerRanks] Player Ranks Local Database Was Saved.
    (10:21:59) | []
    (10:21:59) | MySql handle raised an exception (NullReferenceException: Object reference not set to an instance of an object)
    (10:21:59) | at MySql.Data.MySqlClient.MySqlConnection.get_ServerThread () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlConnection.HandleTimeoutOrThreadAbort (System.Exception ex) [0x00000] in <filename unknown>:0
      at (wrapper remoting-invoke-with-check) MySql.Data.MySqlClient.MySqlConnection:HandleTimeoutOrThreadAbort (System.Exception)
      at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader (CommandBehavior behavior) [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader () [0x00000] in <filename unknown>:0
      at (wrapper remoting-invoke-with-check) MySql.Data.MySqlClient.MySqlCommand:ExecuteReader ()
      at MySql.Data.MySqlClient.Driver.LoadCharacterSets (MySql.Data.MySqlClient.MySqlConnection connection) [0x00000] in <filename unknown>:0
    From reading through the error, to me it looks like a borked connection as afterwards:

    (10:36:01) | [EMSQL] Creating or Updating EM Stats Table

    Yep I think it's Player Ranks:

    Code:
    (10:51:01) | [EMSQL] Creating or Updating EM Stats Table
    (10:51:28) | [PlayerRanks] Player Ranks MySQL Database Was Saved.
    (10:51:28) | [PlayerRanks] Player Ranks Local Database Was Saved.
    (10:51:28) | MySql handle raised an exception (MySqlException: Invalid attempt to call NextResult when the reader is closed.)
    (10:51:28) | at MySql.Data.MySqlClient.MySqlDataReader.Throw (System.Exception ex) [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader (CommandBehavior behavior) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Aug 30, 2017
  8. Should be fine with a /pr save?
     
  9. just run the command via console and got:

    Code:
    (11:26:29) | [PlayerRanks] Player Ranks MySQL Database Was Saved.
    (11:26:45) | [PlayerRanks] PlayerRanks database was saved.
    (11:26:45) | Calling 'cmdSave' on 'PlayerRanks v1.3.0' took 15517ms
    (11:26:45) | Calling 'cmdSave' on 'PlayerRanks v1.3.0' took average 0ms
    (11:26:45) | ExType: MySqlException
    (11:26:45) | MySql handle raised an exception (SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall.
    )
    (11:26:45) | at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
      at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    Could it be a locked table?
     
  10. is there a way to reset players data when not in game? i know about the admin command which does this but for me its a little annoying not to be able to reset the data outside of the game.
    im not sure if im missing anything and you are able to do this please let me know. if you arent able to could this be added? a way to reset players data through the servers console?
     
  11. Hey @GhostGaming
    Right now the only console command is playerranks.save

    I'll add in wipe soon - pretty sure I meant to do it a long time ago and forgot!
     
  12. awesome! cheers. it will be soo useful haha
    players data always ends up not getting wiped on my server haha cause i forget to login in the game or dont have time to haha
     
  13. No sweat. Thanks for the reminder.

    I'll add the same to EMSQL while I'm at it.
     
  14. no problem, i want the same kinda thing added to the kits plugin too haha but no answer on the thread for that yet sadly
     
  15. Any idea why this is happening? Server/oxide updated to latest versions. Wipe was few days ago (droped table too), all clean. When these errors happen all players get kicked for packet flooding : /
    Code:
    (13:54:13) | [Oxide] 13:54 [Error] MySql handle raised an exception (NullReferenceException: Object reference not set to an instance of an object)
    (13:54:13) | [Oxide] 13:54 [Stacktrace]   at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader (CommandBehavior behavior) [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader () [0x00000] in <filename unknown>:0
      at (wrapper remoting-invoke-with-check) MySql.Data.MySqlClient.MySqlCommand:ExecuteReader ()
      at MySql.Data.MySqlClient.Driver.LoadServerProperties (MySql.Data.MySqlClient.MySqlConnection connection) [0x00000] in <filename unknown>:0
    Code:
    (13:55:07) | [Oxide] 13:55 [Error] MySql handle raised an exception (NullReferenceException: Object reference not set to an instance of an object)
    (13:55:07) | [Oxide] 13:55 [Stacktrace]   at MySql.Data.MySqlClient.MySqlDataReader.Read () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.Driver.LoadServerProperties (MySql.Data.MySqlClient.MySqlConnection connection) [0x00000] in <filename unknown>:0
    Code:
    (13:55:18) | [Oxide] 13:55 [Error] Failed to call hook 'OnPlayerInit' on plugin 'PlayerRanks v1.3.0' (NullReferenceException: Object reference not set to an instance of an object)
    (13:55:18) | [Oxide] 13:55 [Stacktrace]   at MySql.Data.MySqlClient.MySqlDataReader.Close () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlConnection.Close () [0x00000] in <filename unknown>:0
      at Oxide.Core.MySql.Libraries.MySql.CloseDb (Oxide.Core.Database.Connection db) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayerRanks.LoadMySQL () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayerRanks.SaveData () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayerRanks.OnPlayerInit (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayerRanks.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
    Code:
    (13:56:18) | [Oxide] 13:56 [Stacktrace] ExType: MySqlException
    (13:56:18) | [Oxide] 13:56 [Error] MySql handle raised an exception in 'PlayerRanks v1.3.0' plugin (EndOfStreamException: Failed to read past end of stream.)
    (13:56:18) | [Oxide] 13:56 [Stacktrace]   at MySql.Data.MySqlClient.MySqlStream.ReadFully (System.IO.Stream stream, System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlStream.LoadPacket () [0x00000] in <filename unknown>:0
     
  16. You know you can just trash the data file while the server's down?
    I mean, console command is nice and I'll still be adding it but just saying in case you didn't know. :)
    [DOUBLEPOST=1504365387][/DOUBLEPOST]
    I've seen this. @PryMary is having the same problem.
    I have at least three people with no issue whatsoever, though, so I'm at a loss.

    We exchanged mysql versions, went through full wipe/install/restart...I can't pin this down to anything.

    I'll compare to 1.2.3 asap and see if I can find out what's gone wrong.
     
    Last edited by a moderator: Sep 2, 2017
  17. Aye agreed I have to use 1.2.9 or otherwise I get players kicked for packet flooding as well. I just got home from my sisters wedding so can get back on to fault finding / trying to make it work lol
     
  18. ah cool :) also having a console command for it, ensures you dont delete another file by accident haha
     
  19. Code:
    [Oxide] 19:28 [Error] Failed to call hook 'OnDispenserGather' on plugin 'PlayerRanks v1.3.0' (NullReferenceException: Object reference not set to an instance of an object)
    [Oxide] 19:28 [Stacktrace]   at Oxide.Plugins.PlayerRanks.ProcessResourcesGathered (.BasePlayer player, Int32 amount) [0x00000] in :0
      at Oxide.Plugins.PlayerRanks.OnDispenserGather (.ResourceDispenser dispenser, .BaseEntity entity, .Item item) [0x00000] in :0
      at Oxide.Plugins.PlayerRanks.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in :0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in :0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in :0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in :0
    [Oxide] 19:28 [Error] Failed to call hook 'OnStructureUpgrade' on plugin 'PlayerRanks v1.3.0' (NullReferenceException: Object reference not set to an instance of an object)
    [Oxide] 19:28 [Stacktrace]   at Oxide.Plugins.PlayerRanks.ProcessStructuresUpgraded (.BasePlayer player) [0x00000] in :0
      at Oxide.Plugins.PlayerRanks.OnStructureUpgrade (.BaseCombatEntity entity, .BasePlayer player, Enum grade) [0x00000] in :0
      at Oxide.Plugins.PlayerRanks.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in :0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in :0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in :0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in :0 
     
  20. Code:
    (16:22:28) | Failed to call hook 'OnPlayerInit' on plugin 'PlayerRanks v1.3.0' (NullReferenceException: Object reference not set to an instance of an object)
    (16:22:28) | at MySql.Data.MySqlClient.MySqlDataReader.Close () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlConnection.Close () [0x00000] in <filename unknown>:0
      at Oxide.Core.MySql.Libraries.MySql.CloseDb (Oxide.Core.Database.Connection db) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayerRanks.LoadMySQL () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayerRanks.SaveData () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayerRanks.OnPlayerInit (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayerRanks.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
    Code:
    (16:26:29) | ExType: MySqlException
    (16:26:29) | MySql handle raised an exception in 'PlayerRanks v1.3.0' plugin (SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
    )
    (16:26:29) | at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0
      at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
    (16:26:29) | MySql handle raised an exception in 'PlayerRanks v1.3.0' plugin (NullReferenceException: Object reference not set to an instance of an object)
    (16:26:29) | at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.MySqlCommand.AsyncExecuteWrapper (Int32 type, CommandBehavior behavior) [0x00000] in <filename unknown>:0