mob
Click(mob/M)
if(M in src.targetlist)
src<<"You already have [M] targeted!"
return
else
for(M in src.targetlist)
M--
M.overlays-=/obj/Target/Norm
src.targetlist+=src
M.overlays+=/obj/Target/Norm
if(!client)
M<<"[src] looks at you."
else
src<<"You look at youself."
Problem description:
Cannot modify null.overlays
You are defining M as a type mob/M and then trying to subtract from it. Thats not what you're trying to do I don't think.
What you want to do is something like this:
But that doesn't really make any sense either, because then it would be trying to access element 0 and a list starts with element 1. So I'm not entirely clear on what it is you're trying to do with that counter.
This line:
Adds the source as a target in its own list. I don't think that's what you want either.
It would help if I knew what your code was supposed to do.