turf/End // this works but would like to access the savefile via the srcs name associated with the save file
icon = 'end.dmi'
name = ""
DblClick()
if(fexists("/players/[usr.ckey].sav")) // find the save file if it exists
Choosing_delete: // a label so if they choose to say "No" at the next prompt they come back here.
var/delete_choice = input("Which save file to delete?","Ending Odyssey?") in list("/players/[usr.ckey].sav","Nothing")
if(delete_choice == "Nothing")
return // does nothing but return to the title screen
else
var/delete_save = input("Are you sure you want to delete this save file?","Ending Odyssey?") in list ("Yes","No")
if(delete_save == "No")
goto Choosing_delete // goes back to all choices
return // safety return
else
fdel("/players/[usr.ckey].sav") // deletes the save file but would like to refer to the savefile by the name associated with it
usr << "You deleted your save file." // need to change it so that they see the file's name they just deleted
else
usr << "There are no Odysseys to end."
return
Problem description: The programming is fine but the only issue I have is that I'd like to be able to prompt the savefile as the users name associated with it. Like say the users name associated with the savefile is "Fred". Well, instead of showing the un-deciphered savefile text I'd like it to show "Fred" along with "Nothing".
This is my first time with even being successful with savefiles and so far I've gotten the save and load all done but not it's just this. If I'm doing something wrong let me know as well please.
Also keep in mind using goto is a bad programming practice, and that if someone's name is Nothing they won't be able to delete it. It would be best to say in list()|null, then saying if(!delete_choice) instead of if(delete_choice == blah blah).