ID:1955862
 
(See the best response by LordAndrew.)
Code:
mob/Player
Login()
..()
src.items+=new/obj/clothing/Shirt


mob
var
list/items

obj
var/quantity
var/equipped = FALSE
clothing

New(quantity)
if(quantity)
src.quantity = quantity
..()

Write(savefile/f)
..()
f.dir.Remove("overlays")

Shirt
name = "Shirt"
icon = 'Shirt.dmi'


Click()
if(!src.equipped)
src.equip(usr)
else
src.unequip(usr)
..()
verb
Color()
set category = null
if(src.equipped)
src<<output("Not while being equiped","OOC")
return
src.icon+=ConvertColor(input("What color would you like your [src] to be?","Color") as color)

proc
equip(mob/Player/m)
for(var/obj/clothing/t in m.items)
if(t.equipped)
t.equipped = FALSE
m << "You unequip the [t.name]."

src.equipped = TRUE
m << "You equip the [src.name]."

unequip(mob/Player/m)
src.equipped = FALSE
m << "You unequip the [src.name]."

mob/proc/update_items()
set background = TRUE
winset(src, "inventory.inventory", null)

var/i = 0
/*
for(var/obj/o in src.items)
if(istype(o, /obj/weapons))
o.overlays.Cut()

var/amt = "[o.quantity]"
var/_x
var/x_

if(lentext(amt) == 2)
x_ = "[copytext(amt, 1, 2)]"
_x = "-[copytext(amt, 2, 3)]"
else
x_ = "0"
_x = "-[amt]"

//var/icon/_i = new('leveldisplay.dmi', _x)
//var/icon/i_ = new('leveldisplay.dmi', x_)

o.overlays.Add(i_, _i)

src << output(o, "inventory.inventory:[++i]")*/

for(var/obj/t in src.items)
if(istype(t, /obj/clothing))
t.overlays.Cut()

var/amt = "[t.quantity]"
var/_x
var/x_

if(lentext(amt) == 2)
x_ = "[copytext(amt, 1, 2)]"
_x = "-[copytext(amt, 2, 3)]"
else
x_ = "0"
_x = "-[amt]"

var/icon/_i = new('levelDisplay.dmi', _x)
var/icon/i_ = new('levelDisplay.dmi', x_)

t.overlays.Add(i_, _i)

src << output(t, "inventory.inventory:[++i]")

winset(src, "inventory.inventory", {"cells = "1x[i]""})


mob/Player/verb
OOC(txt as text)
if(Omute == 1)
src << output("OOC is disabled!", "output1")
if(Mute == 1)
src << output("You're muted!", "output1")
else
if(src.key in admin)
world << output("<font color=yellow>(Admin)[src.key]:</font> [txt]","OOC")
return
if(src.key in mods)
world << output("<font color=yellow>(Mod)[src.key]:</font> [txt]","OOC")
return
else
world << output("<font color=yellow>(OOC)[src.key]:</font> [txt]","OOC")
return

Admin()
set hidden = 1
if(src.key in admin&&mods)
winshow(src,"Admin",TRUE)
else
return

inventory()
set hidden = 1
src.update_items()
winshow(src,"inventory",TRUE)


Problem description:I'm trying to get this shirt to appear in the usrs inventroy when logging in but it gives this runtime error: runtime error: type mismatch: Shirt (/obj/clothing/Shirt) += Shirt (/obj/clothing/Shirt)
proc name: Login (/mob/Player/Login)
usr: Nero (/mob/Player)
src: Nero (/mob/Player)
call stack:
Nero (/mob/Player): Login()

You don't appear to be initializing the items list anywhere.
In response to LordAndrew

?
In response to Edit Nero
Best response
You've defined the variable mob/var/list/items, but you're not initializing it by setting it to an actual list object. Because of this, items is null and cannot have objects added to it.

What is actually happening is this:

mob
var list/items

Login()
..()
src.items += new /obj
world << src.items // This will output "obj"
src.items += new /obj // At this line a runtime error will occur, because you're now trying to add an object to another object (which does not work).

At some point, you need to do items = list() in order for items to be a list (which in turn allows it to hold things).
I've done that and still get a mismatch runtime error

mob
var list/items = list()