Player Ranks

Player ranks and stats database

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

5/5, 19 likes
  1. Cool. Thanks. :)
     
  2. Steenamaroo updated PlayerRanks with a new update entry:

    1.1.2

     
  3. Awesome, even cause i juust was about to ask about SQL function.

    Tried it out already. some... data is in the database now. but thats what i got in the console ->

    Screenshot
     
  4. Looks like the name with @ symbol in it is causing the problem.
    I could add that to the symbol filter list, but I can't help but feel there's a better way!?

    Thanks for the feedback. :)
    [DOUBLEPOST=1491692020][/DOUBLEPOST]Got it, I think. Leave it with me. ;)
     
  5. filtering would be pretty decent . i mean to "just" remove one guy or rename him wouldnt be a good solution where players will always name themselfes wierd.

    but overall. a Great continue from Rank-me. C# aswell, like it . And on the top now SQL aswell. awesome. now i dont have to suffer anymore with my own build shit to make charts out of the sql... C#...fine... but sql ...fuck no haha.

    Keep the good job goin,
     
  6. Ha, tell me about it! I put all my scrappy js tablesorting nonsense in the bin a few days ago. :) Relief.

    I'll get this sorted. I've just done it wrong. ;)
    I have it half fixed...shouldn't be long.

    Thanks for the kind words.
     
  7. PMd you a fix.
    If you don't mind trying it out, i'll send it live after you test.
     
  8. If there isn't any pvp kills, function pvpkills() will call pvpdistance() that will call pvpkills() etc, resulting in a server crash.
     
  9. That's no longer the case. What version are you on?
     
  10. Code:
    MySql handle raised an exception in 'PlayerRanks v1.1.2' plugin (MySqlException: 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 '0','0','3','33','1','3','0','0','0','0','0','0','35','0','0','0','0','13','0','0' at line 1)
    (12:56:28) | MySql handle raised an exception in 'PlayerRanks v1.1.2' plugin (MySqlException: Incorrect string value: '\xF0\x9D\x95\x83\xF0\x9D...' for column 'Name' at row 1)
     
  11. I'm on the last version. Even with 1 pvpkill, and 1 pvpdistance the server crash 15 minutes after loading the plugins after outputting a lot of times:
    Code:
    [PlayerRanks] loopinum
     
  12. Ok, thank you.
    That'll be in the next update, coming very soon. :)
     
  13. Code:
    15:55 [Info] [PlayerRanks] Player Ranks Local Database Was Saved.
    15:55 [Info] Unloaded plugin PlayerRanks v1.1.2 by Steenamaroo
    15:55 [Info] Loaded plugin PlayerRanks v1.1.2 by Steenamaroo
    16:25 [Info] [PlayerRanks] Player Ranks Local Database Was Saved.
    16:25 [Info] [PlayerRanks] Player Ranks Local Database Was Saved.deleted lang, config and oxide.reload PlayerRanks
    restart server17:14 [Info] [PlayerRanks] loopinum
     

    Attached Files:

  14. All noted. Thanks everyone.
     
  15. Steenamaroo updated PlayerRanks with a new update entry:

    1.1.3

     
  16. a little thing i noticed... well. its hard to miss

    Our console getting spammed with
    Code:
     (19:05:14) | [PlayerRanks] Player Ranks Local Database Was Saved.
    (19:05:14) | [PlayerRanks] Player Ranks SQL Table created, or exists.
    (19:05:14) | [PlayerRanks] Player Ranks MySQL Database Was Saved.
    
    Ofc i could just remove it myself but i wanted to mention that just :p

    maybe a option for console output would be cool


    Edit - Nevermind. Seems that - Delete the Lang file and reload- just worked fine.
     
    Last edited by a moderator: Apr 11, 2017
  17. Hey,
    Yeah, those lines output every time the plug saves. Maybe that's a bit much, with the manual save-timer option now.

    Console option sounds like a plan.
    I'll add that in next version, along with permissions instead of admin.

    There's something unexpected triggering saves too. I noticed this last night.
    When I first load the plug it saves every * minutes as expected but, after a while, it's saving every 2 - 3 mins.
    I'm on it. ;)
     
  18. Incorrect string happend again, not fixed.
    Also sometimes, plugin said mysql_conn isn't closed, can you add close statement when db conn isn't necessary in next update please.

    Code:
    3:39 PM [Error] MySql handle raised an exception in 'PlayerRanks v1.1.3' plugin (MySqlException: Incorrect string value: '\xF0\x9F\x94\x9E O...' for column 'Name' at row 1)
    3:39 PM [Stacktrace]   at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x00000] in <filename unknown>:0
    
    [​IMG]
    Also some NRE with timer and OnPlayerInit

    Code:
        Line 30789: 15:43 [Error] Failed to call hook 'OnPlayerInit' on plugin 'PlayerRanks v1.1.3' (NullReferenceException: Object reference not set to an instance of an object)
        Line 30793:   at Oxide.Plugins.PlayerRanks.LoadMySQL () [0x00000] in <filename unknown>:0
        Line 30794:   at Oxide.Plugins.PlayerRanks.SaveData () [0x00000] in <filename unknown>:0
        Line 30795:   at Oxide.Plugins.PlayerRanks.OnPlayerInit (.BasePlayer player) [0x00000] in <filename unknown>:0
        Line 30796:   at Oxide.Plugins.PlayerRanks.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 
    Code:
    15:50 [Error] Failed to run a 1800.00 timer in 'PlayerRanks v1.1.3' (NullReferenceException: Object reference not set to an instance of an object)
    15:50 [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.<SaveData>m__23D () [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00000] in <filename unknown>:0
    
    Code:
    15:54 [Info] [PlayerRanks] Player Ranks Local Database Was Saved.
    15:54 [Info] [PlayerRanks] Player Ranks SQL Table created, or exists.
    3:54 PM [Error] MySql handle raised an exception (NullReferenceException: Object reference not set to an instance of an object)
    3:54 PM [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 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
    15:54 [Info] [PlayerRanks] Player Ranks MySQL Database Was Saved.
    3:54 PM [Error] MySql handle raised an exception (MySqlException: Incorrect string value: '\xF0\x9F\x94\x9E O...' for column 'Name' at row 1)
    3:54 PM [Stacktrace]   at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x00000] in <filename unknown>:0
    3:54 PM [Error] MySql handle raised an exception in 'PlayerRanks v1.1.3' plugin (MySqlException: Incorrect string value: '\xF0\x9F\x94\x9E O...' for column 'Name' at row 1)
    3:54 PM [Stacktrace]   at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00000] in <filename unknown>:0
      at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& affectedRow, System.Int64& insertedId) [0x00000] in <filename unknown>:0
    
    [​IMG]
     
  19. Hi Sami,
    Thanks for the detailed feedback.

    I'm not sure what's causing the string issue right now but can only guess it's something specific in one of the player names.
    Is there any chance you can try to chase this down or, at least, send me your json db?
    May help a lot.

    The NREs. I was aware of of the timer NRE and am looking in to it but was not aware of the onplayerinit issue. Will look into this.

    Connection closing has already been added to my current test version.
    The only time there's a message about connection closing now is on unload.

    Thanks for all these points.
     
  20. Everyone else, I'm working at these issues with Sami's help.

    There is still a problem with symbols in names when SQL saving, although local json should be fine.
    If that's a pain for you please just disable SQL for the time being.

    I'm also aware of a mistake with save loop where several instances can be running at once. This is fixed and will be released soon.

    Update to follow.
    Thanks for all the feedback and patience. :)