ID:157488
 
Hi,

Whenever I delete an object from the code, all the player's save files that had that obj error when they load and don't load anything after that, so people lose half their inventory. Is there some way to avoid that happening, without using 'placeholder' objs?
An example of what you could do. What's so bad about placeholder objs?
obj
carrot
icon = 'carrot.dmi'
icon_state = "fresh"
mob
verb
give_carrot()
src.contents += /obj/carrot
mob
verb
take_carrot()
src.contents -= /obj/carrot
usr << "Ey, thats mine!"
mob
Logout()
src.contents -= /obj/carrot
In response to Darkjohn66
That wouldn't really work because if it doesn't save I don't know what obj's they had in the first place.

Placeholder obj's will just clutter up my code and some of the obj's are /obj/skill/ type, and it does things like "for every skill" so it would include the placeholder obj's in that list...
In response to Sprin
Set up variables for every object. Save them, and when you login/load the account if that variable is say set to 1 add the verb, if 0 return.
It's theoretically possible to filter out old entries in savefiles, but really you're better off just keeping them defined and deleting as you go. For example:

obsolete
New()
del(src)

// Define a compiler macro to make typing a bit easier
#define OBSOLETE parent_type=/obsolete

obj/thing_we_dont_want_any_more
OBSOLETE