under
grass
new/item/new_grass(src.loc)
var/item/m = new
m.Disappear()
item
proc
Disappear()
var/A = src.loc
spawn(20)
if(src.loc == A)
del src
Problem description:
i am trying to delete the instance of new_grass within 2 seconds. the problem is that the disappear proc is outside of the "under" root.
i am not getting any errors but the object is not disappearing.
I hope you are putting that chunk of code under under/grass in it's New() proc. Plus, your m.Disappear() is tabbed over for whatever reason. Also, code under spawn() should be tabbed. This is because it lets the rest of the code execute, and saves the code tabbed under it for when the allotted time is up. sleep() just stops the whole process until the allotted time is up, which is why you don't put things tabbed after it.
Also, your referencing is wrong. Try this: