Jump to content

XP Save does not work after server restart


<BHS/Club

Recommended Posts

Hello silEnT experts!

 

We experience this issue:

Every time the server restarts, every player's XP is gone. The levels are saved though.

 

Server log gives this information:

 

*=====INITIALISING USER DATABASE
* Opening user database file userdb.db.
* Opening user database file userxdb.db.
* User database files open. Caching database.
140 players cached from the user database.
No additional user records in the user database.
*=====DATABASE READY FOR USE

 

relevant silent.cfg settings (if you want whole .cfg, please say so):

 

set g_dbDirectory "database"

set g_dbUserMaxAge "3o"

 

set g_XPSave 21

set g_XPSaveMaxAge_xp "3o"

set g_XPSaveMaxAge "3o"

set g_XPSaveMinXP "-1"
set g_maxXP "-1"
set g_maxXPResetWarn 0
set g_damageXP "1"
set g_damageXPLevel "50"
set g_xpdecay "0"
set g_xpdecayrate "0"
set g_xpdecayfloor "0"

 

What we tried so far:

 

- deleting useradb, userdb, userxdb while server was stopped

-> new files are created, XP still won't save

 

- checking "g_dbUserMaxAge" via RCON

-> "g_dbUserMaxAge" was in fact set to "0" on server

 

- Adding '+set g_XPSaveMaxAge_xp "3o"' to startup line

-> "g_dbUserMaxAge" RCON check positive, but XP still wasn't saved after server restart

 

PLEASE NOTE:

Test XP was made in game and not given via RCON, !nextmap was executed

 

Any ideas?

 

 

Link to comment
Share on other sites

  • Management

If the XP saves between maps but not between full restarts, it indicates that the g_XPSave is set to "0" when starting the server and then changes to the value you have in your config file. Please check that it is not so. When ever the g_XPSave is zero when the mod initializes, it will clear the old stored XP from players.

Link to comment
Share on other sites

Awesome! Thank you very much!

 

Added "+set g_XPSave 21" to the startup line and it works now!

 

Now, I could be happy and leave it at that, but would you like to elaborate me WHY did it work before without it? :D

Only if you want to, I am just always eager to learn something new.

Link to comment
Share on other sites

  • Management

You probably changed the execution of the silent.cfg so that the map command is executed before the config is loaded. I'm not sure if g_XPSave is an archived cvar, meaning the server would remember the old value between server restarts. Might be a good option to add to it if it is not.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...