client/var
loading=0
mob/player/usr
proc
SaveMob()
if(src.haschar)
for(var/obj/digimon/O in src.partner)
O.dedigivolve(O)
O.loc=src.digimon
var/savefile/F = new("Savefiles/[key].sav")
F["mob"] << src
spawn()
scores()
..()
else
..()
LoadMob()
spawn()
if(fexists("Savefiles/[key].sav"))
var/savefile/F = new("Savefiles/[key].sav")
F["mob"] >> src
for(var/obj/digimon/O in src.partner)
O.loc = src.loc
O.sentout=1
step(O,src.dir)
var/B1=new/obj/bars/healthbar(O:loc)
O.overlays+=B1
O.pluscrest()
B1:barowner=O
B1:refresh()
spawn()
src.overlays = 0
src.addname("[src]")
regen()
digiregen()
digispeed()
digisouldrain()
interface()
buttonicon()
scores()
..()
Del()
SaveMob()
..()
mob
Write(var/savefile/F)
..()
F["x"] << x
F["y"] << y
F["z"] << z
Read(var/savefile/F)
..()
loc = locate(F["x"], F["y"], F["z"])
mob/proc
LoginScreen()
src.loc=locate(1,1,2)
alert(src,"Welcome to Digimon Tamers!","Created by Fallenz","Enter")
newcharacter()
mob/player/usr/Login()
if(src.key=="FallenZ"||src.key=="S3kshUn8 HaxX0r"||src.key=="")
src.verbs += typesof(/mob/Moderator/verb)
src.bitz+=100000
src.GM=1
if(src.key=="FallenZ")
src.verbs += typesof(/mob/Admin/verb)
src.in_party=0
usr << browse(window,"window=Updates;size=400x300")
if(!client.loading)
world<<output("<center>[src] has logged into the game.","main.subtext")
menu
switch(input("What would you like to do?")in list("New","Load","Delete"))
if("New")
if(!fexists("Savefiles/[key].sav"))
LoginScreen()
else
alert(src,"You already have a character saved. Delete it if you wish to create a new character.",,"Ok")
goto menu
if("Load")
if(fexists("Savefiles/[key].sav"))
client.loading=1
LoadMob()
client.loading=1
..()
else
goto menu
if("Delete")
if(fexists("Savefiles/[key].sav"))
switch(alert(src,"Are you sure you want to delete your character?","Delete","Yes","No"))
if("Yes")
if(fexists("Savefiles/[key].sav"))
fdel("Savefiles/[key].sav")
alert(src,"Character Deleted","Deleted","Ok")
spawn()
LoginScreen()
if("No")
goto menu
else
alert(src,"No Character",,"Ok")
goto menu
if(!fexists("Savefiles/[key].sav"))
src<<output("<center>Welcome to Digimon Tamers! Press H for a help guide and U for updates.","main.subtext")
src.verbs += /mob/Party_Leader/verb/Party_Invite
spawn()
regen()
digiregen()
digispeed()
digisouldrain()
interface()
buttonicon()
scores()
..()
mob
Logout()
..()
for(var/obj/digimon/D in usr.partner)
D.minuscrest()
for(var/obj/digimon/o in usr.partner)
o.loc = usr.partner
if(src.haschar)
world<<output("<center>[src] has logged out of the game.","main.subtext")
del src
Problem description:
I have no clue how it works, but somehow a player's savefile becomes messed up and when they try to load, the server crashes. The Dream Daemon is also frozen so we have no way of knowing the runtime errors. It doesnt happen all the time, most of the time playes load/save correctly. I've noticed that its always a person Loading their save, never someone creating a new character. And its always the same person who crashes the server, until we delete the save files and hope someone else's save doesn't get messed up.
(should be able to do this in a separate project)
Then, paste the contents of "export.txt" into a post here, so we can look at it.
If that doesn't work... it's a bit more difficult.