ID:139270
 
Code:
mob/Logout()
if(!ckey) del(src)
if(loc in block(locate(1,1,1),locate(18,34,1)))
world.log<<"[usr] did not meet proper params when logging out."
del(src)
world << "<font color=silver>Server Information: [name] has left us!"
text2file("Server Information: [name] has left us!","Chatlog.txt")
var/savefile/F=new("Save/[ckey].sav")
Restore_P()
F["x"]<<src.x
F["y"]<<src.y
F["z"]<<src.z
F["verbs"]<<src.verbs
F["Player"]<<src
sleep(2)
Write(F)
sleep(10)
del src

mob/proc
Load()
if(fexists("Save/[ckey].sav"))
var/savefile/F=new("Save/[ckey].sav")
Read(F)
sleep(2)
src = F["Player"]
src.contents += F["contents"]
src.Move(locate(F["x"], F["y"], F["z"]))
if(!isnull(F["verbs"])) src.verbs.Add(F["verbs"])
//winset(usr,"default.Tabs","Tabs=\"Character,Inventory,Browser,Tabs\"")
world << "<font color=silver>Server Information: [src] has joined us!"
text2file("Server Information: [src] has joined us!","Chatlog.txt")
//winset(src,"default.map","size=\"764x544\"")
if(usr.KO)
usr.icon_state="dead"
usr.UnKo()
usr.status = "Conscious"
usr.Droids=list()
for(var/mob/droid/D in world) if(D.owner==usr.ckey) Droids+=D
if(!Droids.len) src.verbs-=typesof(/mob/droid/verb/)
if(src.Dead)
src.icon_state="ghost"
src.overlays=null
src.density=0
src.Dead=1
src.invisibility=5
src.see_invisible=5
src.move=1
usr.status = "Dead"
spawn() AgeCheck()
spawn() CreateHUD()
src.icon_state=""
// spawn() UpdateBars()
spawn() Update_Inventory()
spawn() usr.Regenerate()
spawn() UpdateProfession()
spawn() Live()
if(usr.Groupleader)
usr.verbs -= /mob/Group/verb/Start_Group
usr.verbs += /mob/Group/verb/Leave_Group
usr.verbs += /mob/Group/verb/Change_Rank
usr.verbs += /mob/Group/verb/Recruit
usr.verbs += /mob/Group/verb/Boot_From_Group
if(src.loc in block(locate(1,1,1),locate(18,34,1)))
src.loc = locate(271,229,15)
if(!src.loc||src.loc.type==/turf/Start/Space||src.loc.type==/turf/Space/Stars||src.loc.type==/turf/Start/Title1||src.loc.type==/turf)
src.loc = locate(271,229,15)
if(src.key =="Seteden")
src.verbs += typesof(/mob/Admin/verb)
src.verbs += typesof(/mob/Moderator/verb)
if(src.key =="Bemcint")
src.verbs += typesof(/mob/Admin/verb)
src.verbs += typesof(/mob/Moderator/verb)
if(src.key =="Kanye East")
src.verbs += typesof(/mob/Admin/verb)
src.verbs += typesof(/mob/Moderator/verb)
else
alert("You do not have any characters on this server.")
return


Problem description:
When I attempt to load the user's load file, it fails to load the verbs or the users location properly. I've gone about every which way to load the verbs and variables that I can think of such as src.x == F["x"] and so on.

Also Note: This only happens when I use F["Player"]<<src but, I don't know of a better way to go about saving/loading as far as it goes, seeing as this part is definately not my strongest in programming.
In all reality, you don't even need to save the player instance. If you save the needed variables, overlays, etc...then you can just load them all into a new mob created upon login. Try this, and if you still have problems, post back here.
In response to Albro1
Albro1 wrote:
In all reality, you don't even need to save the player instance. If you save the needed variables, overlays, etc...then you can just load them all into a new mob created upon login. Try this, and if you still have problems, post back here.

That would take a lot of time though.. Is there a way to reduce the var load into a single var?
In response to Albro1
Albro1 wrote:
In all reality, you don't even need to save the player instance. If you save the needed variables, overlays, etc...then you can just load them all into a new mob created upon login. Try this, and if you still have problems, post back here.

Which is, interestingly, exactly what just saving the entire player does.
In response to Garthor
Oho, but was that necessary? No, it was not.
In response to Albro1
It was necessary to point out that you were suggesting that Seteden reproduce the entirety of the Read() and Write() procedures for no actual purpose, yes.
In response to Garthor
Your point is valid; yet you fail to mention that the attitude of your post was unnecessary. It doesn't take much to see that your post was almost to the point of mocking me, and rudeness like that is unnecessary. A simple "Saving the entire player does this anyways." would have sufficed.

Attitude is also conveyed through posting, and I would like it if you worked on yours.

With that, I am done here. I do not want to derail this topic any further.