PlayerDatabase

Big database with light weight way to save it to prevent lag

Total Downloads: 2,478 - First Release: May 30, 2016 - Last Update: Jan 11, 2017

5/5, 8 likes
  1. ah ... *** didnt think about that
    [DOUBLEPOST=1474649545][/DOUBLEPOST]i'll have to change it to oxide sqlite version and not the facepunch version.
    keep the old version for hurtworld then.
     
  2. Wulf

    Wulf Community Admin

    Use Oxide.Core.Database and Oxide's SQLite library. ;)
     
  3. Reneb updated PlayerDatabase with a new update entry:

    1.4.2

     
  4. Reneb, can you pls change the folder, where the new sql db is located? Not every hosting allow access to root folder...
     
  5. it's in oxide/data now
     
  6. Oh. i didnt see this, thanks
    [DOUBLEPOST=1474765550][/DOUBLEPOST][Oxide] 4:03 AM [Error] Sqlite handle raised an exception (SQLiteException: SQL logic error or missing database
    duplicate column name: {0})
    [Oxide] 4:03 AM [Debug] at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, UInt32 timeoutMS, System.String& strRemain) [0x00000] in <filename unknown>:0
    at System.Data.SQLite.SQLiteCommand.BuildNextCommand () [0x00000] in <filename unknown>:0

    And ban in EBS still not working... After /ban or player.ban nothing happens
     
  7. Code:
    (16:27:44) | [Oxide] 1:27 PM [Error] Sqlite handle raised an exception (SQLiteException: SQL logic error or missing database
    unrecognized token: "{")
    (16:27:44) | [Oxide] 1:27 PM [Debug]   at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, UInt32 timeoutMS, System.String& strRemain) [0x00000] in <filename unknown>:0
      at System.Data.SQLite.SQLiteCommand.BuildNextCommand () [0x00000] in <filename unknown>:0
     
  8. Loads but does not work in hurtworld. Also Spams console with
    11:04 PM [Debug] at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, UInt32 timeoutMS, System.String& strRemain) [0x00000] in <filename unknown>:0
    at System.Data.SQLite.SQLiteCommand.BuildNextCommand () [0x00000] in <filename unknown>:0
    11:04 PM [Error] Sqlite handle raised an exception (SQLiteException: SQL logic error or missing database
    unrecognized token: "{")
     
  9. also left a debug file with this


    SQLite format 3 @ -æ
    ü 4 4¿ ))KtablePlayerDatabasePlayerDatabaseCREATE TABLE PlayerDatabase ( id INTEGER NOT NULL PRIMARY KEY UNIQUE, userid TEXT , '{0}' TEXT);O) indexsqlite_autoindex_PlayerDatabase_1PlayerDatabase
     
  10. Reneb updated PlayerDatabase with a new update entry:

    1.4.3

     
  11. Update fixed the console error but still doesn't work and get this debug file


    SQLite format 3 @ -æ
    ü A A¿ |))3tablePlayerDatabasePlayerDatabaseCREATE TABLE PlayerDatabase ( id INTEGER NOT NULL PRIMARY KEY UNIQUE, userid TEXT );O) indexsqlite_autoindex_PlayerDatabase_1PlayerDatabase
     
  12. i dont understand this.
    try unloading the plugin
    delete everything relavted to playerdatabase and reload the plugin
     
  13. Here's what I get in console now

    04:24 [Info] PlayerDatabase was compiled successfully in 2636ms
    04:24 [Info] Loaded plugin PlayerDatabase v1.4.3 by Reneb
    04:24 [Warning] id
    04:24 [Warning] userid
    04:24 [Info] Unloaded plugin PlayerDatabase v1.4.3 by Reneb <---- I did not reload the plugin again here
    04:24 [Info] Loaded plugin PlayerDatabase v1.4.3 by Reneb
    04:24 [Warning] id
    04:24 [Warning] userid
    04:24 [Warning] new column name
    04:24 [Warning] new column ip
    04:24 [Warning] new column steamid

    That debug file is called playerdatabase.db and appears in oxide/data folder. Here is what it says this time

    SQLite format 3 @ -æ
    ü ¿ $))‚tablePlayerDatabasePlayerDatabaseCREATE TABLE PlayerDatabase ( id INTEGER NOT NULL PRIMARY KEY UNIQUE, userid TEXT , 'name' TEXT, 'ip' TEXT, 'steamid' TEXT);O) indexsqlite_autoindex_PlayerDatabase_1PlayerDatabase
    ç ç / 76561198198783237
    ü ü
     
  14. ah you can't open the .db like that XD
    you need a sqlite browser (ex: DB Browser for SQLite )
    And yes i forgot to remove the debugs ^^
    it should be fine and only show on plugin initialisation. i'll fix it without emergency ^^
     
  15. My mistake. First time I've ever seen a db file appear like that. Anyway I will give it more time and see if it starts working after some patience :)
     
  16. from what you showed me it should work
     
  17. Reneb updated PlayerDatabase with a new update entry:

    1.5.0

     
  18. Reneb updated PlayerDatabase with a new update entry:

    1.5.1

     
  19. Still not working for me. I kept it on for hours and it never compiled any identities in the playerdatabase folder and left the same db file.
     
  20. where is the db file?