Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

XP Save does not work after server restart


  • Please log in to reply
3 replies to this topic

#1
OFFLINE   <BHS/Club

<BHS/Club

    Newbie

  • Members
  • Pip
  • 2 posts
2
A step in the right direction

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?

 

 



#2
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

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.



#3
OFFLINE   <BHS/Club

<BHS/Club

    Newbie

  • Members
  • Pip
  • 2 posts
2
A step in the right direction

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.



#4
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland

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.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users