ID:268361
 
It never finds an object derived from the type /obj/unit. And that's my problem. I assume it has something to do with the list that is created, but I'm not sure.

I get no compile or runtime errors, it just simply doesn't find it when I KNOW a unit is in the src's loc.

mob
proc/Select()
var/value = 0
var/list/L = typesof(/obj/unit)
for(var/obj/O in src.loc)
if(istype(O,/obj/buildings/base)) value += 1
if(O in L)
value += 1
else src << "We didn't find a unit, sir!"
if(!value) return
if(value==2)
src.SelectUnit()
else if(value)
src.ff=1
src.SelectBuilding()


Thank ya!

Resonating Light
Compare the value of O to the values in L. You'll notice that L is full of type paths and O is a reference to an object.
In response to DarkView
Hoo-ray! I've got it to work! Thanks for your help.

Resonating Light