ID:273983
 
Runtime Error:
runtime error: Cannot read null.defense
proc name: Attack (/mob/proc/Attack)
usr: King-okal (/mob)
src: King-okal (/mob)
call stack:
King-okal (/mob): Attack(null)
Attack (/obj/Skills/Attack): DblClick("Skills", "skills.info1", "icon-x=24;icon-y=18;left=1")

All Revelvant Code:
        statpanel("Skills")
stat(src.skills)
mob/var/list/skills=list(new/obj/Skills/Attack)
obj/Skills
Attack
icon='AttackImg.gif'
DblClick()
usr.Attack()
mob
proc
Attack(mob/M in get_step(usr, usr.dir))
var/damage=usr.strength - M.defense
M.health -= damage
M.DC()
M<<output("[src] attacked you for [damage]!","dmgo")

well i was seeing my attack verb and i clicked it and the runtime error came,It may be because i wasnt infront of an npc but i dont want that happening when someone just clicks attack
Do a check to see if M exists.

if(!M) return
In response to Albro1
Works, Thanks!!
In response to King-okal
No problem.