Save()
var/savefile/F = new(PFILE_DIR + "[lowertext(name)].sav")
lastroom = loc.id
F["lastroom"] << lastroom
F["password"] << password
F["profession"] << profession
F["country"] << country
F["clan"] << clan
Write(F)
Load(N)
var/savefile/F = new(PFILE_DIR + "[lowertext(N)].sav")
var/rightpass
var/T = tinput(src, "Password:")
F["password"] >> rightpass
if(cmptext(rightpass,T))
F["lastroom"] >> lastroom
F["profession"] >> profession
F["country"] >> country
F["clan"] >> clan
Read(F)
M.AddPlayer(src)
move(LocateRoom(lastroom))
logged = 1
return 1
else src << "Wrong Password.";del src;return 0
Problem description:
Well, its not saving my health and stamina variables. Should Write() save it?
2) Can you please post the definitions of your health and stamina variables, as well as lastroom, password, profession, country and clan (since you shouldn't have to save them explicitly)