ID:150018
 
Alright, last night I changed an object, /obj/equipment/weapon/NewArea/Guardians_Axe, to /obj/equipment/weapon/HarpieTemple/Guardians_Axe.. Now everyone who had the former icon, and logs in, can no longer use that character... This is the output.

BYOND Error: failed to certify Reokon
Warning: type read from file (/obj/equipment/weapon/NewArea/Guardians_Axe) is not defined.
runtime error: cannot append to list
proc name: base LoadMob (/client/proc/base_LoadMob)
usr: ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter)
src: Reokon (/client)
call stack:
Reokon (/client): base LoadMob("Lord_Reo")
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): ChooseCharacter()
ChoosingCharacter (/mob/BaseCamp/ChoosingCharacter): Login()

Now, how could I modify the code to automatically delete the item from the file if it cannot be found?

Polatrite, Assassin of the Sun
Do a player wipe (delete all the .sav files), when a savefile can't find the vars it has saved it gives you some nice little runtime errors.
In response to Nadrew (#1)
I would, but alot of my players are level 20+. I don't want to sacrifice their hours of work just because a couple have a bug. I just want to modify the code to delete the item for me.
In response to Polatrite (#2)
Since it was removed from your code there's no way to add code to remove it.
Polatrite wrote:
Alright, last night I changed an object, /obj/equipment/weapon/NewArea/Guardians_Axe, to /obj/equipment/weapon/HarpieTemple/Guardians_Axe.. Now everyone who had the former icon, and logs in, can no longer use that character... This is the output.

BYOND Error: failed to certify Reokon

This part isn't the library...that's a BYOND problem.


Warning: type read from file (/obj/equipment/weapon/NewArea/Guardians_Axe) is not defined.

The thing to do is create the original object type again in your code, then set it to delete itself after it is read in...something like:

/obj/equipment/weapon/NewArea/Guardians_Axe
Read()
// Let myself get read in.
var/result = ..()

// Delete myself in a tick...just to make sure I'm not confusing anything.
spawn()
del(src)
return ..()


This is just off the top of my head, so test it before you roll it out.