ID:144265
 
Code:
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: i admit this is ripped and i have a problem whenever i load up a char i do it hrough a window that says nerw load quit when i click load i loads up fine but then window pops up again and wont go away i click load again and there another of me

The problem you're having isn't related to this code, but you shouldn't be initializing newmob because that gets creating during the load from the file.

The issue with the window popping up is a separate thing, and this code isn't responsible for it. Moral of the story: Don't use ripped code. If you don't know how it works then fixing it is going to be difficult.

Lummox JR