ID:1886227
 
(See the best response by Kaiochao.)
Code:
mob/var 
list
Items=list()

mob/verb/Get_Sword()
usr.GetSword(usr)

mob/proc/GetSword(mob/M)
var/obj/B = new/obj/Weapons/Soul_Cutter/
M.Items+=B
M.tested = 1
M.race = "Soul Protector"
M.Sword_Pick(M)
M << "You used 'Get Sword'!"


Problem description:
runtime error: type mismatch: 0 += Soul Cutter (/obj/Weapons/Soul_Cutter)
proc name: GetSword (/mob/proc/GetSword)
usr: Techno (/mob/player)
src: Techno (/mob/player)
call stack:
Techno (/mob/player): GetSword(Techno (/mob/player))
Techno (/mob/player): Get Sword()

I'm trying to add an object to a list so it can be called up and edited at any point, but it won't work.

(This was just a small snippet I made so I could quickly check if changes I made worked.)


Best response
mob
var Items[] // = null; this is important

verb/get_sword()
GetSword()

proc/GetSword()
if(!Items) Items = new // this is also important
Items += new /obj/Weapons/Soul_Cutter
tested = TRUE
race = "Soul Protector"
Sword_Pick(src)
src << "You used 'Get Sword'!"

Cleaned it up for you. I don't see how that error could happen in this snippet. I'm not sure how you got it either, unless you're setting Items to 0 somewhere in the code you haven't shown.
In response to Kaiochao
Your snippet worked, not sure why mine didn't, but thanks. :)