ID:157574
 
mob
Login()
if(src.HasShirt == 1)
src.HasShirt = 1
else
src.HasShirt = 0
return ..()

mob
Logout()
var/savefile/F = new(ckey)
Write(F)
del(src)

mob
var/shirtover = 'basicshirt.dmi'
var/HasShirt
var/shirtcolor
verb
shirtsetting(s as color)
shirtcolor = null
if (HasShirt == 0)
// shirtcolor = null
shirtcolor = s
shirtover += s
src.overlays += shirtover
HasShirt = 1
return
else if (HasShirt == 1)
shirtcolor = null
src.overlays -= shirtover
HasShirt = 0
return

Every time I use this verb this is what happens. The very first color I choose gets set. Then every time I attempt to change it, the color gets lighter and lighter until eventually it turns white. I don't know how to reset the color before using the verb, I tried null it it but... it didnt work. It does save though (although my save system is currenlty suckish instead of saving a short name it saves pages of random characters...it works though)
Setting shirtcolor to null does nothing because shirtcolor is just a variable. Changing it has no impact on another variable, namely the shirtover variable.

If you want to reset the shirtover variable, storing its initial value somewhere and then operating on that would be one option. Or, you can just use initial(shirtover), though that's less flexible.

Also, adding color is generally undesirable. Multiplying is usually a better effect.
What is the purpose of your Login() procedure? I'm just curious, because it doesn't really do anything. You are setting the variables to what they are already set to.
Try this:
mob
var/shirtover = 'basicshirt.dmi'
var/HasShirt
var/shirtcolor
var/default_shirt = 'basicshirt.dmi'
verb
shirtsetting(s as color)
shirtcolor = null
if (HasShirt == 0)
shirtover = default_shirt
shirtcolor = s
shirtover += s
src.overlays += shirtover
HasShirt = 1
return
else if (HasShirt == 1)
shirtcolor = null
src.overlays -= shirtover
HasShirt = 0
return