ID:266505
 
This is the code for making saving and loading a player's passport:
Player
var
Passport/Passport
Login()
..()
src.Passport = load("Player/[src.key]/Passport")
if(Passport == null)
Passport = new /Passport (null)
Passport.Owner = src
Logout()
save("Player/[src.key]/Passport",src.Passport)
..()
del src

However, instead of loading the passport it loads my mob. In fact, it does not load the passport at all. Here are the save and load procs, if they matter:
proc
save(var/path = "",var/input)
var/savefile/S = new("DitMUD.sav")
S[path] << input
load(var/path)
var/savefile/S = new("DitMUD.sav")
return S[path]

Thanks in advance!

-Lord of Water
I hate to bump a post, but it's been some time and it does not look like anybody's going to answer at this rate. The problem is consistant and quite annoying. Thanks again.

-LoW
Lord of Water wrote:
However, instead of loading the passport it loads my mob. In fact, it does not load the passport at all. Here are the save and load procs, if they matter:
proc
save(var/path = "",var/input)
var/savefile/S = new("DitMUD.sav")
S[path] << input
load(var/path)
var/savefile/S = new("DitMUD.sav")
return S[path]

I don't see where it would be loading the mob, but one thing I do see: You don't use the >> operator anywhere in your load routine. I would think that would be necessary.

Try this:
proc
load(var/path)
var/savefile/S = new("DitMUD.sav")
var/item
S[path] >> item
return item

Lummox JR