What I want to do is check to see if a player has a savefile, and if he does, use the information in it to put him back where he left off, including his location.
If he doesn't have a savefile, I want to prompt him for the information to make one.
Here is what I have:
Login()
var/savefile/F = new("players.sav")
var/safename = ckey(usr.key)
if (!loc) //new player
usr.class = input("What class?") in list ("Human")
if (usr.class == "Human")
usr.icon = 'Human.dmi'
usr.loc = locate(11,20,1)
usr.icon_state = input("What gender?") in list ("male","female")
F["[safename]"] << usr
else
F["[safename]"] >> usr
world << "[usr] has joined, say hi!"
I realize that it's pointless to ask for class when there is only one option, I'll be adding more.
In almost all of my games, I start out with ^^^ because I build off of procs. Probably not the best way to go about it, but it gets the job done.
Saving and loading is another easy option.
Loads would look exactly the same, with the << being >> instead, for input.
Normally I'd recommend you a DM Reference page, but they seem to be more complicated than they really need to tbh, so I'll save you the brain hurt. Good luck learning how to code.