ID:270431
 
I have this Saving and Loading System in place and I need help converting it from a one character thing to multiple.
Here is what I have now. If its easier to just not convert and make a whole new one, how would I be going about that because my expertise is not in lists. :(
client
proc
Load()
var/savefile/load
load = new ("Save Files/[src.mob.ckey]")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
mob/Guest
Login()
if(fexists("Save Files/[src.client.ckey]"))
L.Add(SUPER_NEW,SUPER_LOAD,SUPER_QUIT)
var/menu = input("Character File Found.","[world.name]") in L
switch(menu)
if(SUPER_NEW)

var/skin = input("Do you want to make a new character?","") in list ("Yes","Never Mind")
switch(skin)
if("Never Mind")
goto reload

if("Yes")
Create()
if(SUPER_LOAD)
src.client.Load()

if(SUPER_QUIT)
del(src.client)
else
L.Add(SUPER_NEW,SUPER_QUIT)
var/newmenu = input("Character File Not Found.","[world.name], \"New Player\"") in L
switch(newmenu)
if(SUPER_NEW)
Create()
if(SUPER_QUIT)
del(src.client)
..()
You should try to contact Super16, after all it is his Super Saving Demo But Flame Sage has a decent library which includes 3 saving slots.
Rage the Dark wrote:
I have this Saving and Loading System in place and I need help converting it from a one character thing to multiple.
Here is what I have now. If its easier to just not convert and make a whole new one, how would I be going about that because my expertise is not in lists. :(
> client
> proc
> Load()
> var/savefile/load
> load = new ("Save Files/[src.mob.ckey]")
> load["mob"] >> src.mob
> load["x"] >> src.mob.x
> load["y"] >> src.mob.y
> load["z"] >> src.mob.z
> mob/Guest
> Login()
> if(fexists("Save Files/[src.client.ckey]"))
> L.Add(SUPER_NEW,SUPER_LOAD,SUPER_QUIT)
> var/menu = input("Character File Found.","[world.name]") in L
> switch(menu)
> if(SUPER_NEW)
>
> var/skin = input("Do you want to make a new character?","") in list ("Yes","Never Mind")
> switch(skin)
> if("Never Mind")
> goto reload
>
> if("Yes")
> Create()
> if(SUPER_LOAD)
> src.client.Load()
>
> if(SUPER_QUIT)
> del(src.client)
> else
> L.Add(SUPER_NEW,SUPER_QUIT)
> var/newmenu = input("Character File Not Found.","[world.name], \"New Player\"") in L
> switch(newmenu)
> if(SUPER_NEW)
> Create()
> if(SUPER_QUIT)
> del(src.client)
> ..()

If you want to try storing multiple characters for a single key, you'll have to create more directories for the different characters the player is going to make. Therefore, when saving or loading from a file, just enter maybe:

Before:
load["mob"] >> src.mob
After:
load["[ckey(name)]/mob"] >> src.mob
Etc.

Basically this will create directories inside the player's savefile (using the player's name after it's been ckeyed) to save the files.

Read up chapter 12 (i think) of DM guide.
Consider using hub://Deadron.CharacterHandling instead of that weird system you've got there. (mob.Write() and mob.Read(), anyone? Super16? Please.)

01000100011000010111010001100001
In response to Android Data
Thanks I got it right how I like it.