ID:147932
 
the following code has no errors, runtime or not, but the load proc won't make the mob visible.
client
var
created = 0
proc
Save()
if(src == null)
return 0
var/savefile/F = new("players/[key].save")
var/char_ckey = cKey(src.mob.name)
F["/[ckey]/[char_ckey]"] << src.mob
Load(char_ckey)
//var/mob/new_mob
var/savefile/F = new("players/[key].save")
F["/[ckey]/[char_ckey]"] >> src
/*if(!new_mob)
return 0
else
src.mob = new_mob
return 1*/

Del()
Save()
..()

mob
verb
Save()
src.client.Save()
Login()
..()
switch(input("What do you want to do?")in list("Create New Character", "Continue", "Quit"))
if("Quit")
del(src)
if("Create New Character")
src.Create()
if("Continue")
client.Load()
proc
Create()
var/char_name = input("What is your name?","Character Creation",src.key) as text
src.name = char_name
src.icon = 'avatars.dmi'
switch(input("Which avatar would you like?","Character Creation") in list("Lan","Mayl","Dex","Yai","Chaud"))
if("Lan")
src.icon_state = "Lan"
if("Mayl")
src.icon_state = "Mayl"
if("Dex")
src.icon_state = "Dex"
if("Yai")
src.icon_state = "Yai"
if("Chaud")
src.icon_state = "Chaud"
Write(savefile/F)
..()
F["last_x"] << x
F["last_y"] << y
F["last_z"] << z
F["temp_icon"] << icon
F["temp_icon_state"] << icon_state
Read(savefile/F)
..()
var/last_x
var/last_y
var/last_z
F["temp_icon"] >> icon
F["temp_icon_state"] >> icon_state
F["last_x"] >> last_x
F["last_y"] >> last_y
F["last_z"] >> last_z
loc = locate(last_x, last_y, last_z)

This not extremely frustrating, just annoying. any help is appreciated.
Looks like you started up using an old savefile, and it tried to load "temp_icon" into src.icon; but since there was no "temp_icon" in the file, src.icon became null.

There's no good reason to save the icon and state again, though; they save already. In fact you should look for ways not to save src.icon, or to save a string or something instead that tells you which icon file to use. Saving an icon takes up lots of extra space.

Lummox JR