<dm>I've got a problem here that I can't seem to track.
mob/Login calls getname(src) (tried usr too)
a ways down the proc, I have:
var/loginname = input(M, "What will you name this character?", "Login", null)
and
var/savefile/F = new ("Players/[ckey(loginname)]")
Further down I have:
M << "debug: You're loginname is [loginname]"
F["Name"] << loginname
F["Password"] << newpassword
M.lastroom = 300
F["LastRoom"] << M.lastroom
M << "debug: You're loginname is [loginname]"
M.name = loginname
LoadMob(M, loginname)
return
And then in loadmob I have.
mob/proc/LoadMob(mob/M as mob, loginname as text)
if(!fexists("Players/[ckey(loginname)]"))
M << "Error: Savefile doesn't exsist."
del(M)
return
var/savefile/F = new ("Players/[ckey(loginname)]")
F["Name"] >> M.name
I've been examining this for over a week now and can't seem to figure out how come it's not working properly. it shows the correct name in the debug messages of the saving part. It's completely halted progress on my game, and put me in a fairly grumpy mood. Does anyone see why M.name is null after all this?
Later on I put a check for some other random variable to see if that would work, and it worked fine.
Class is saved like this:
F["Class"] << "Testing Person"
And the fourth debug message on my loadmob proc shows. "M.class is Testing Person." But the third message remaisn "M is , loginname is blah, M.name is "
The second message (directly above it) shows "M is Zagreus, loginname is Zagreus, M.name is Zagreus"
Now, names were saved like this:
F["Name"] << loginname
I have debug messages showing directly before that line, that loginname does indeed exsist, and is text. But I figured that maybe if I made it look even more like a text string it'd work, like the Class thing did, so I did:
F["Name"] << "[loginname]"
Unfortunately, neither worked.
On the loading proc I even tried creating a var/tmpname and then putting F["Name"] >> tmpname, that didn't help either.
Does anyone know what's going on here?