ID:171095
 
I have a problem with my clothing code. When I put a shirt on, everything goes well. When I take it off, everything goes well EXCEPT the overlay is not removed.

obj shirt layer=MOB_LAYER+1 verb Wear() set src in usr if(usr.shirt!=null)usr<<"You're already wearing a shirt!" else usr.shirt=src src.suffix+="Wearing" usr.overlays+=src Take_Off() set src in usr if(usr.shirt==null)usr<<"You're not wearing a shirt!" else if(usr.shirt==src) src.suffix=null usr.shirt=null usr.overlays-=src else usr<<"You aren't wearing that shirt!" Blue_Shirt icon='shirt.dmi'


If anyone knows how to fix this, thanks1
usr.overlays-=src.icon?
In response to Hell Ramen
w00t, thanks mah.