var/X = 100
for(var/obj/Gold/A in world)
if(X > get_dist(src,A))
T = A
X = get_dist(src,A)
world << "[src] was unable to find a target!"
src.Target = T
world << "[src] has targetted the [src.Target]"
walk_towards(src, src.Target, 0, src.MoveDelay)
world << "[src] is walking"
I have 3 rocks on the map, it should be able to find at least one target, but target is always null. Any ideas on why?