1
2
My players randomly get their save files deleted and then a .sav.lk file pops up in the save folder with their key. Can anyone tell me what this is?
|
Jun 25 2015, 1:34 pm
Best response
|
|
The .lk file is a lock file created by Dream Daemon to avoid other processes (or itself, in some cases) messing with the savefile.
|
In response to Lummox JR
|
|
How do I disable that lock? or is there no way?
|
The lock is there for a reason; but if the files don't exist anymore, you can just delete it.
The random deletion issue you mentioned is the bigger deal. The lock should not be causing that, but is probably left over as a side effect. |
In response to Lummox JR
|
|
Their save files don't necessarily get deleted, rather whenever they log on, the lock file appears and they start off wiped when their save files still in tact in the folder that it's located it.
|
Are you seeing any runtime errors that say anything about failure to load the file?
|
In response to Lummox JR
|
|
Not in particular..
|
mob/proc |
Hummm those procs look ok to me... What about the write and read proc? Do they look like this?
Write(var/savefile/f) |
In response to Misticone
|
|
Mmm, I used the built in write and read proc
|
So you didn't write any reference to the Write or Read proc?
The Write proc will determine what is supposed to be sent and stored in the savefile and the read proc will get the data from the savefile, for example: mob |
In response to Misticone
|
|
Yeah, I know what the read and write procs do, but when I didn't define it, it still just saved every variable by itself, so I thought it was good. Every once in a while, a player's save file just randomly loses all its saved variables and the .lk extension file pops up out of nowhere.
|
Hummm yeah, you're correct...I was just hoping that it could fix your problem...it's weird.... Show me how are you calling the Save and Load procs.
|
In response to Misticone
|
|
Whenever you log in, it loads. Whenever you logout it saves. Whenever you kill someone/die, it also saves.(It's an arena game.)
ex) mob/Login() |
Hummm this is really weird. Humm ok, you said that players lose data, right? When does that happen? When the player logs in? during gameplay? Randomly?
|
In response to Misticone
|
|
The player instantly logs off and back on, I can tell cause it appears in the chat, then their entire save file just disappears out of random, while the .sav file is still intact with their variables saved and in check. Sometimes restarting the server rolls their save back and it's alright, but most of the time that won't fix the issue. Also, sometimes when their .sav file that got wipe is still in the folder, they can't load anything like, playing a new save and relogging won't load up that save.
|
I think I know what's happening: You're experiencing the dreaded rollback.
Somewhere you've allowed mobs to accidentally save each other in their savefiles. This happens most often when you use a var like a turf, and don't mark it as tmp: mob/var/turf/badidea // anything on this turf will be saved When a player logs in who has someone else in their savefile, that older version of the other player's mob loads up. Because it has a key var, it takes control of their client--they log out of their current mob, and log into their past self. If you want to avoid a pwipe, you'll have to either find all the savefiles that have this and edit the extra mobs out manually, or you'll have to alter mob/Read() to scrub the offending vars before they load. (In any case you need to make sure the offending vars become tmp so they stop saving.) |
In response to Lummox JR
|
|
Pwiped, made deathcheck save both the killer and the person killed.
|
1
2