var/mob/loaded = F["SRC"]
for(var/x in loaded.vars)
src.vars[x] = loaded.vars[x]
Made no difference.
As far as the ExportText() thing goes, I'm showing how I'm using it. I placed it in the save_proc, at the end. I'm assuming everything is updated before it is ran?
Somehow a new mob is getting created. I'm assuming you've verified that the load_proc() is clean and makes sense. I dunno' here, this is so wonky. I'm starting to think it might be better if I let someone more experienced look at the project and find the culprit here, I'm not finding much (although it has been narrowed down considerably, thanks to you mostly.)
I just tried deleting all saves and using load to see if it logs any mobs, and the answer is no. Which means the extra mob is getting created once an actual save is getting loaded.
I just tested it trying to load the .txt files we were generating, which thankfully were saved in the player's .sav directory as well. It didn't generate any mob logs, which means it has to be a valid .sav for it to happen. I'll look into it a bit more.
Edit: I started logging for Logouts too, which gave me something interesting. When it says I log out, I stay viewing the roaming mob, and the game continues running. I can even continue trying to load and create characters. It logs one instance of a mob when I try to load a character..
Nothing happens to the default mob I stay connected to.. maybe the character thats being loaded is getting loaded onto that duplicate mob, since there are no messages getting added to the log for a Logout() instance. Yet it says "Kitsueki has been logged out", so Logout() has to be running..?
I would include [ckey] in your debugging output. The issue here in particular is we don't want any player mobs popping up that don't actually have any clients driving them.
Agreed. But if this were the case, it seems most likely that the cause would be from the contents of your savefile itself, but since we have been checking that it shouldn't be the problem.
Just because I have to ask, are you sure you've been using ExportText() AFTER the savefile is being updated?
You actually aren't outputting a mob to a mob. Loading something from a savefile should just loop through any vars stored in the savefile and update them as necessary. "F["SRC"] >> src" should just be the equivalent of typing src.Read() as far as I know.
As for your current situation and where to go from here: now that you've narrowed down where the phenomenon is coming from, I suggest you try circumventing parts of the code in question and seeing if you can make the problems stop happening. Specifically, the problem where you get disconnected. Also, are you checking your Options & Messages screen to make sure you aren't getting runtimes when you are getting d/c'd?