Once you log out and reconnect, after login it creates a new save file in the folder (Save File 0) and writes to that file instead. So when player loads a game it loads the original save file that was made after creation so no progress can ever be made.
Char creation/selection screen
Trying to keep out all irrelevant code
switch(sd_alert(src,"Welcome to [world.name]","[world.name]",list("New Character","Load Character","Delete Character")))
if("New Character")
var/del_name = ""
switch(sd_alert(usr,"Which slot do you wish to select?","New Character",list("Slot 1","Slot 2","Slot 3")))
if("Slot 1")
if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
switch(sd_alert(usr,"You already have a Character on Slot 1. Overwrite it?","",list("Yes","No")))
if("Yes")
var/savefile/Load = new("Player Saves/[src.client.ckey]/Save File [src.save_filec].sav")
Load["Name"] >> del_name
if(fexists("World Save Files/Player Names.sav")) fdel("World Save Files/Player Names.sav")
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Remove(ckey(del_name))
N["Name"] << Name
//src.save_file_1 = 1
src.save_filec=1
Create()
else continue
else
//src.save_file_1 = 1
src.save_filec=1
Create()
if("Slot 2")
if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
switch(sd_alert(usr,"You already have a Character on Slot 2. Overwrite it?","",list("Yes","No")))
if("Yes")
var/savefile/Load = new("Player Saves/[src.client.ckey]/Save File [src.save_filec].sav")
Load["Name"] >> del_name
if(fexists("World Save Files/Player Names.sav")) fdel("World Save Files/Player Names.sav")
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Remove(ckey(del_name))
N["Name"] << Name
//src.save_file_2 = 1
src.save_filec=2
Create()
else continue
else
//src.save_file_2 = 1
src.save_filec=2
Create()
if("Slot 3")
if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
switch(sd_alert(usr,"You already have a Character on Slot 3. Overwrite it?","",list("Yes","No")))
if("Yes")
var/savefile/Load = new("Player Saves/[src.client.ckey]/Save File [src.save_filec].sav")
Load["Name"] >> del_name
if(fexists("World Save Files/Player Names.sav")) fdel("World Save Files/Player Names.sav")
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Remove(ckey(del_name))
N["Name"] << Name
//src.save_file_3 = 1
src.save_filec=3
Create()
else continue
else
//src.save_file_3 = 1
src.save_filec=3
Create()
if("Load Character")
switch(sd_alert(usr,"Which slot do you wish to select?","Load Character",list("Slot 1","Slot 2","Slot 3")))
if("Slot 1")
if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
//src.save_file_1 = 1
src.save_filec=1
src.client.Load_1()
else
sd_alert(usr,"No Saved File Found!")
sleep(11)
continue
if("Slot 2")
if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
//src.save_file_2 = 1
src.save_filec=2
src.client.Load_1()
else
sd_alert(usr,"No Saved File Found!")
sleep(11)
continue
if("Slot 3")
if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
//src.save_file_3 = 1
src.save_filec=3
src.client.Load_1()
else
sd_alert(usr,"No Saved File Found!")
sleep(11)
continue
if("Delete Character")
var/del_name = ""
switch(sd_alert(usr,"Which slot do you wish to delete?","Delete Character",list("Slot 1","Slot 2","Slot 3")))
if("Slot 1")
switch(sd_alert(usr,"Are you Sure?","",list("Yes","No")))
if("Yes")
if(fexists("Player Saves/[src.client.ckey]/Save File 1.sav"))
var/savefile/Load = new("Player Saves/[src.client.ckey]/Save File 1.sav")
Load["Name"] >> del_name
if(fexists("World Save Files/Player Names.sav")) fdel("World Save Files/Player Names.sav")
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Remove(ckey(del_name))
N["Name"] << Name
else
sd_alert(usr,"No Saved File Found!")
sleep(11)
if("Slot 2")
switch(sd_alert(usr,"Are you Sure?","",list("Yes","No")))
if("Yes")
if(fexists("Player Saves/[src.client.ckey]/Save File 2.sav"))
var/savefile/Load = new("Player Saves/[src.client.ckey]/Save File 2.sav")
Load["Name"] >> del_name
if(fexists("World Save Files/Player Names.sav")) fdel("World Save Files/Player Names.sav")
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Remove(ckey(del_name))
N["Name"] << Name
else
sd_alert(usr,"No Saved File Found!")
sleep(11)
if("Slot 3")
switch(sd_alert(usr,"Are you Sure?","",list("Yes","No")))
if("Yes")
if(fexists("Player Saves/[src.client.ckey]/Save File 3.sav"))
var/savefile/Load = new("Player Saves/[src.client.ckey]/Save File 3.sav")
Load["Name"] >> del_name
if(fexists("World Save Files/Player Names.sav")) fdel("World Save Files/Player Names.sav")
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Remove(ckey(del_name))
N["Name"] << Name
else
sd_alert(usr,"No Saved File Found!")
sleep(11)
continue
break
..()
proc
Create()
var/mob/mobcreation = new /mob/PC()
var/newname = null
var/config = "065-090&097-122&095&032"
sd_alert(src,"Welcome to [world.name] v[gamev]")
while(1)
var/myname = null
while(!asciifilter(myname,config)||!myname)myname = propername(input("Pick Character Name","Name",src.key) as text)
if(ckey(myname) in Name)
sd_alert(usr,"This name is already in use. Try again please,")
<------ More char creation options, blah blah blah ------>
After you pick your char type, ect this is how the code ends..
break
mobcreation.energy_code = rand(0000001,9999999)
mobcreation.it_blocked = 1
mobcreation.loc = locate(145,60,1)
mobcreation.NotifyOfSave()
mobcreation.name = newname
mobcreation.version=1
mobcreation.save_filec = save_filec
switch(sd_alert(src,"Would you like to participate in sagas?","Sagas",list("Yes","No")))
if("No")
mobcreation.tab_saga = 0
if(fexists("World Save Files/Player Names.sav")) fdel("World Save Files/Player Names.sav")
var/savefile/N = new("World Save Files/Player Names.sav")
Name.Add(ckey(mobcreation.name))
N["Name"] << Name
players << "<font color=blue>[world.name] Information: <font color = white>Everyone welcome our newest Player:<font color=silver> [mobcreation.name]<font color=white> the<font color=red> [mobcreation.race]!"
src.Updates()
src.client.mob = mobcreation
spawn(3) src.client.mob.overlays += src.client.mob.coloredhair
del(src)
Code for Load/Save
This is where I believe I'm having the issue, not sure why.
client
proc
Load_1()
var/savefile/load
load = new ("Player Saves/[src.ckey]/Save File [src.save_filec].sav")
load["mob"] >> mob
load["x"] >> mob.x
load["y"] >> mob.y
load["z"] >> mob.z
Save_1()
if(!src||!mob) return
Ranking(mob)
if(fexists("Player Saves/[src.ckey]/Options.sav")) fdel("Player Saves/[src.ckey]/Options.sav")
var/savefile/csave
var/GML=mob.GMLevel
if(key==world.host) mob.GMLevel=0
csave = new ("Player Saves/[mob.ckey]/Options.sav")
csave["Tutorial"] << mob.Tutorial
csave["Jailed"] << mob.jailed
csave["Jail Time"] << mob.jail_time
csave["Muted"] << mob.muted
csave["Mute Time"] << mob.mute_time
if(key!=world.host) csave["GMLevel"] << mob.GMLevel
csave["AM"] << mob.AdnM
csave["GMLock"] << mob.GMLock
csave["AHM"] << mob.adminhelpmute
csave["MK"] << mob.mkallow
csave["Storage"] << mob.personal_storage
csave["HasStorage"] << mob.has_storage
var/savefile/save
save = new ("Player Saves/[src.ckey]/Save File [src.save_filec].sav")
save["Name"] << mob.name
save["mob"] << mob
save["x"] << mob.x
save["y"] << mob.y
save["z"] << mob.z
mob:SetScores()
mob.GMLevel=GML
if(mob.notifysave&&mob.afk_time<5) src<<"<font color=red>Game Saved."
mob
proc
Auto_Save()
set background = 1
while(src&&src.client)
src.client.Save_1()
src.afk_time ++
src.safe=0
for(var/area/house/S in view(0)) src.safe=1
sleep(900)
Any help appreciated