ID:157694
 
Alright, I know my save system isn't the best, but it works well for me and I don't care to use any libs, including characterhandling. My one problem is that every once in a while someone will relog and I get the following runtime error:

runtime error: cannot append to list
proc name: Load (/mob/proc/Load)
  usr: Robin6675 (/mob/player)
  src: Robin6675 (/mob/player)
  call stack:
Robin6675 (/mob/player): Load()
Robin6675 (/mob/player): Login()


Here's my saving and loading code. If there's any way to alter anything I'm doing or even get around that problem I'd love to hear any suggestions:
mob
proc
Save()
if(src.loggedin==null) return
var/start = 1
var/end = 2
var/first_initial = copytext(src.ckey, start, end)
var/savefile/F=new("players/[first_initial]/[src.ckey].sav")
src.Write(F)
F["lastx"] << src.x
F["lasty"] << src.y
F["lastz"] << src.z
F["V"]<< src.verbs

Load()
var/start = 1
var/end = 2
var/first_initial = copytext(src.ckey, start, end)
var/savefile/F=new("players/[first_initial]/[src.ckey].sav")
src<<"<font color=black size=-1><b>Welcome Back!"
world << "<font color='#191970'><FONT SIZE=+1><FONT FACE='Curlz MT'><B>[usr] has logged in!"
src.Read(F)
var/newX
var/newY
var/newZ
F["lastx"] >> newX
F["lasty"] >> newY
F["lastz"] >> newZ
var/verbz
F["V"]>>verbz
if(verbz) src.verbs+=verbz
src.loc=locate(newX,newY,newZ)
src.LoadHUD()
src.LoginHUD()
As I've said a billion times, calling Read() and Write() directly is unstable. You need to use the << and >> operators on the entire mob. Then, override Read() and Write() to do any special handling that is required (like saving x,y,z).