ID:140035
 
Code:
mob{
var{
savefile/SaveFile = new("players.sav")
}

Login(){
var/savefile/F = client.Import
if(F){
Read(F)
usr << "Welcome back, [name]!"
}
else{
usr << "Welcome, [name]!"
}
..()
}

proc{
SavePlayer(){
var/savefile/F = new()
Write(F)
client.Export(F)
}
}

Write(savefile/F){
F["name"] << name //the players name and icon saved
F["icon"] << icon
F << x //the players coords saved
F << y
F << z
..()
}

Read(savefile/F){
var{
saved_x
saved_y
saved_z
}

F["name"] >> name //restores name and icon
F["icon"] >> icon
F >> saved_x //restores coords
F >> saved_y
F >> saved_z
..()
Move(locate(saved_x,saved_y,saved_z))
}

}

client{
New(){
var/savefile/F = new(ckey)
F >> usr
return ..()
}

Del(){
var/savefile/F = new(ckey)
F << usr
del(usr)
}
}


Problem description:
For some odd reason when i check this dm to my game that i'm trying to create, my game doesn't show up. I don't know what the savefile does to my game i created. I used it on an earlier game i created and it worked fine. Can someone care to explain why my game won't show up? I do have the ..() after the loc procedure, so i don't know why its not showing my map or anything.

You have client.Import there. However, Import is a proc, not a variable. Accessing it like a variable causes... bad things. You shouldn't even be able to.
In response to Garthor
nvm, i changed it to new(ckey) and it worked. i'll see if it'll work and if i have any problems, i'll get back to you.
In response to BlackClaw175
okay now when i compile and run the game, it won't show my avatar or say "welcome...". do i need to change ckey to something else or is it something else i need to change?
In response to BlackClaw175
Well, you need to fix what I already posted in my first post.

You also need to fix that you are saving/loading twice: once in Login()/Logout() and once in client/New() / Del(). client/New() and Del() are the preferable places for this, though, so as long as you replace "usr" (which you should never use in procs excepting those few procs which are only a direct result of user actions and have no argument to replace it, such as Click()) with "mob", you're fine with just deleting the whole attempt to save/load from Login()/Logout().
In response to Garthor
thanks for everything, i got it all solved. one thing i missed << after the client.New() and it didn't know that it was backwards. solved my problems.