Server Help

ASSS Questions - Deleting old cfg values

BDwinsAlt - Thu Jul 13, 2006 10:53 am
Post subject: Deleting old cfg values
I write my rank/money/exp values with the I_CONFIG interface. When I use SetInt it makes a new Int like it's supose to. But when it is used again it creates a new one. So you see something like this multiple times:

Code: Show/Hide

Rank:BDwinsAlt=1
Rank:BDwinsAlt=2


How can I make it just change the value of the first one or make it delete the first one?

Btw this does not interfere with how the modules work. It uses the final data. I just don't want the files to keep growing and growing everytime a players leaves and enters the arena.
Dr Brain - Thu Jul 13, 2006 11:01 am
Post subject:
As far as I know, there is no way to change this behavior without rewriting parts of the config module.
Purge - Thu Jul 13, 2006 12:20 pm
Post subject:
Can't you just search individually by char for the final value and then just change that, then write it to the file?
Smong - Thu Jul 13, 2006 1:36 pm
Post subject:
You can roll your own format for storing ranks. Or if you are only concerned about the rank of players currently logged in you can use the persist module.
BDwinsAlt - Thu Jul 13, 2006 1:38 pm
Post subject:
Alright I'll give it a try. Thanks.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group