ID:2429523
 
(See the best response by Ultimate 2016.)
Descriptive Problem Summary:

My problem is if I do not know if it is one or I am programming badly.

I relay the following line.



Code Snippet (if applicable) to Reproduce Problem:
mob/proc/
Icon()
for(var / mob / M in world)
if(M.Village == "Konoha")
M.overlays + = 'KonohaS.dmi'

or

mob/verb
Message(msg as text)
var/list/T=list()
for(var/mob/M in world)
if(M.Village=="Konoha")
T+=M
if(T.len>=1)
M<<"[msg]"


Expected Results:
That all the M receive the message or add their icons, but only one of them does, maybe it is wrong programming

Actual Results:
It only happens with an M

PD:I speak Spanish so maybe this is translated badly
Best response
In the verb you have a typo. M<<"[msg]" needs to be T<<"[msg]"

All I can really do is show you how I would write it. I don't see a reason why it wouldn't work unless Village is NOT equal to Konoha.

mob/proc
Icon()
for/var/mob/m in world)
if(m.Villain == "Konoha")
m.overlays += 'Konoha.dmi'

mob/verb
Message(msg as text)
var/list/t = new
for(var/mob/m in world)
if(m.Village == "Konoha")
t += m
if(t.len >= 1)
t << msg