obj
var/quant=1
axe
verb
Pick_up()
set src in oview(0)
for(var/obj/axe/a in usr.contents)
a.quant+=1
a.suffix="axe ([a.quant])"
del(src)
return ..()
usr<<"You pick up an <b>axe</b>."
usr.contents+=src
src.name="Wield"
src.suffix="axe ([quant])"
sword
verb
Pick_up()
set src in oview(0)
for(var/obj/sword/a in usr.contents)
a.quant+=1
a.suffix="sword ([a.quant])"
del(src)
return ..()
usr<<"You pick up a <b>sword</b>."
usr.contents+=src
src.name="Wield"
src.suffix="sword ([quant])"
Yes, yes, rubbishy and filled with mistakes, but instead of correcting all my OTHER mistakes, just answer this question. When i have a stacked object in my inventory and am looking at the inventory statpanel, i constantly get this runtime error:
runtime error: Cannot read null.contents
proc
usr:
src:
call stack:
(/obj)
Adam753 (/mob)
but it's just not there. what am i doing wrong this time?