mob/verb/test()
var/obj/O = new()
O.tag = "My Object"
var/obj/O2 = locate("My Object")
ASSERT(O == O2) //this should always be true
Problem description:
When I execute this code shown in the reference once it returns true. If I execute it once more or after it returns false. I assume it is because of the garbage collector but wanted to be sure it wasn't something else.
Setting O.tag to null allows me to use this procedure again and have it return true.
mob/verb/test()
var/obj/O = new()
O.tag = "My Object"
var/obj/O2 = locate("My Object")
ASSERT(O == O2) //this should always be true
O.tag = null
All I can think of it being is something where O.tag is set to "My Object" twice somehow- maybe like a list? Am I on the right track?