mob
Login()
usr.loc = locate(6,6,4)
if(usr.key == "Shomone")
world << "<b><font color=blue>Owner [usr] has entered the world!"
switch(alert("Which one whould you like to choose?","","New","Load","Quit"))
if("New")
if (fexists("players/[usr.ckey].sav")) // Check if they have a save file
switch(alert("If you continue with a new character, your previous character will be erased. Do you wish to continue?","[world.name]","Yes","No"))
if ("Yes")
usr << "... Ok... Beginning character process now."
usr.loc = locate(17,6,4)
return ..()
if ("No")
usr << "Ok, Please reconnect for you are being disconnected now"
del(usr)
return ..()
else
return ..()
usr.loc = locate (17,6,4)
if("Load")
LoadCharacter() // The load character proc
if("Quit")
usr << "Bye bye."
del(src)
mob
proc
LoadCharacter() // The load character proc
var/savefile/F = new("players/[src.ckey].sav") // define the location of the save file
var/X // Defines a temporary X variable
var/Y // Defines a temporary Y variable
var/Z // Defines a temporary Z variable
var/mob/newmob = new() // Initialize a new mob
F["name"] >> name // Load the name from the list into the character's name
F["X"] >> X // Load the X variable from the savefile to the temporary X variable
F["Y"] >> Y // Load the Y variable from the savefile to the temporary Y variable
F["Z"] >> Z // Load the Z variable from the savefile to the temporary Z variable
F["Mob"] >> newmob // Load all the mob data into the initialized mob
newmob.loc = locate(X,Y,Z) // Move the initialized mob to the last saved location
newmob.client = src.client // Set the mob's client to players client
Problem description:
When i click load the menu is still there everything else works apart from load and when i click load again there i a new mob of me standing there