ID:146367
 

mob
skill
verb
Illuminate()
set category = "Doujutsu"
for(var/mob/clone in oview(5))
if(clone)
del(clone)

mob/proc/create()
var/mob/clone=new(src.loc)
clone.icon=src.icon
clone.icon_state=src.icon_state
src.bunshinclone++// adds bunshin clone to its counter
clone.ninjutsu=src.ninjutsu/2
clone.genjutsu=src.genjutsu/2
clone.taijutsu=src.taijutsu/2
walk_towards(clone,src,2)
spawn(300)
del(clone)




Okay it will delete clones but,it will also delete NPCs,I hav tried everyway possible but I cannot fix it.

change the if(clone) to:
for(var/mob/clone/C in oview(5))
if(istype(C,/mob/clone))
del(C)
In response to Fartmonger
Jutsus,Training etc.dm:676:error:C:undefined type: C
Jutsus,Training etc.dm:677:error:C:undefined type: C
Jutsus,Training etc.dm:677:error:/mob/clone:undefined type path
Jutsus,Training etc.dm:678:error:C:undefined type: C
Jutsus,Training etc.dm:676:C :warning: variable defined but not used

I'm new to the istype thing,never seen it before,so I don't know how to fix these errors XD.
In response to Broly103
Jutsus,Training etc.dm:677:error:/mob/clone:undefined type path

That line right there should tell you.