Bump(obj/Enemy/M)
if(istype(M,/obj/Enemy))
if(M)
M.HP
if(M.HP <= 0)
M.loc = locate(1,0,1)
spawn(500) del(M)
for(var/mob/N in world)//<-----Problem
N.gold += 1 + (1* round(N.wave/4))
Coding After:
Bump(obj/Enemy/M)
if(istype(M,/obj/Enemy))
if(M)
M.HP
if(M.HP <= 0)
M.loc = locate(1,0,1)
spawn(500) del(M)
for(var/mob/N in world)//<-----Fixed
N.gold += 1 + (1* round(N.wave/4))
It gave the person gold regardless of the enemy dying or not.
And I hope you didn't indent it after the del(src), otherwise it won't be called since the procedure will be terminated right there.