Code:
proc/base_DeleteMob(char_name)
// Look for a character with the ckey version of this name.
// If found, delete it.
var/char_ckey = ckey(char_name)
var/savefile/F = base_PlayerSavefile()
F.cd = "/players/[ckey]/mobs/"
F.dir.Remove(char_ckey)
proc/base_DeleteMob(mob/M)
// Look for a character with the ckey version of this name.
// If found, delete it.
var/filename = "players/[M.ckey]/[M.ckey].sav"
var/char_ckey = ckey(M)
var/savefile/F = new(filename)
F.cd = "/players/[M.ckey]/mobs/"
F.dir.Remove(char_ckey)
Seems simple enough. Reference the directory of the character inside the save file based on the ckey of the mob, or the name of the mob. However,
proc/DeleteMe(mob/M)
usr<<"<font size=3>You are deleting [M.name]!"
var/filename = "players/[M.ckey]/[M.ckey].sav"
var/savefile/F = new(filename)
F.cd = "/players/[M.ckey]/mobs/"
F.dir.Remove(M.name)
Problem description: The above code does not delete the character. I have tried several variations of this with no effect. After several days of attempts I am nearly convinced that I will have to code my own character handling system from scratch to achieve my desired outcome. Deleting the entire save file DOES work, however, I'm trying to specifically target one character inside the .sav's directory.
If anyone could provide some insight into how to delete characters from a game utilizing Daedron's Character Handling, it would be greatly appreciated. In fact, any input at all would be wonderful.
Thanks for your time!