ID:263121
 
Code:
mob/var/SaveSlot
mob/var/Saves
mob/proc/SaveF()
if(src.SaveSlot==1)
var/savefile/F = new("savefiles/[src.ckey]1.sav")
F["usr"] << usr
F["lastx"] << src.x
F["lasty"] << src.y
F["lastz"] << src.z
if(src.SaveSlot==2)
var/savefile/F = new("savefiles/[src.ckey]2.sav")
F["usr"] << usr
F["lastx"] << src.x
F["lasty"] << src.y
F["lastz"] << src.z
if(src.SaveSlot==3)
var/savefile/F = new("savefiles/[src.ckey]3.sav")
F["usr"] << usr
F["lastx"] << src.x
F["lasty"] << src.y
F["lastz"] << src.z

mob/verb/Save()
usr<<"\red <b>{Server}:\blue Saving..."
SaveF()
usr<<"\red <b>{Server}:\blue Saved"


Problem description:That is my save code, and for some reason it will not load my X, Y, and Z

Don't you have to save their direction too?
Problem description:That is my save code, and for some reason it will not load my X, Y, and Z

If it's not loading, why did you show us the save code instead of the load code?
In response to Airjoe
lol i fell stupid now i pated the wrong code.

mob
proc
Load()
switch(alert("Which Savefile do you wish to load?","Load?","SaveSlot 1","SaveSlot 2","SaveSlot 3"))
if("SaveSlot 1")
if(fexists("savefiles/[src.ckey]1.sav"))
var/savefile/F = new("savefiles/[src.ckey]1.sav")
var/newX
var/newY
var/newZ
Read(F)
F["usr"]>>src
F["lastx"] >> newX
F["lasty"] >> newY
F["lastz"] >> newZ
src<<"TEST"
src.loc=locate(newX,newY,newZ)
src<<"TEST2"
else
alert("No savefile found in the directory","ERROR")
return
In response to National Guardsmen
mob/var/lastx=7
mob/var/lasty=7
mob/var/lastz=3
mob/var/newx=7
mob/var/newy=7
mob/var/newz=3

usr.lastx=usr.newx
usr.lasty=usr.newy
usr.lastz=usr.newz

perhapts this will help u seek what your looking for.
You can shorten that save code by a lot. And use less processing while you're at it.

Just use
var/savefile/F=new("savefiles/[ckey][saveslot].sav")


Instead of all those if() checks.

Also, maybe you are deleting the mob too quickly for it to be saved or something.