Welcome back to the game!
You initiate an attack on the bear.
You did 4 damage to the bear!
the bear did 2 damage to you!
runtime error: Cannot read null.Doing
proc name: AttackTwo (/mob/proc/AttackTwo)
source file: Procedures.dm,21
usr: Marlier (/mob/Player)
src: null
call stack:
AttackTwo(Marlier (/mob/Player), null)
Marlier (/mob/Player): Attack(null)
You initiate an attack on the bear.
You did 4 damage to the bear!
You have slain the bear!
runtime error: Cannot read null.attackDelay
proc name: AttackTwo (/mob/proc/AttackTwo)
source file: Procedures.dm,30
usr: Marlier (/mob/Player)
src: null
call stack:
AttackTwo(null, Marlier (/mob/Player))
AttackTwo(Marlier (/mob/Player), null)
Marlier (/mob/Player): Attack(null)
runtime error: Cannot modify null.Doing.
proc name: AttackTwo (/mob/proc/AttackTwo)
source file: Procedures.dm,23
usr: Marlier (/mob/Player)
src: null
call stack:
AttackTwo(Marlier (/mob/Player), null)
Marlier (/mob/Player): Attack(null)
Code:
mob
proc
//BEGIN ATTACK PROCEDURE
AttackTwo(mob/A,mob/D)
set background=1
if(istype(D,/mob/Attackable)) //If enemy
if(A.attackDelay >= 1)
return
A << "You initiate an attack on [D.Name]."
var/youHitOrNot = rand(A.Rogueness+2,D.Evasion-2)
if(youHitOrNot > D.Evasion)
var/youDamageDone = rand((A.Strength / A.Level) + 1,(A.Strength / A.Level) + 3)
var/youDamageDone2 = youDamageDone - D.Toughness
if(youDamageDone2 < 1) youDamageDone2 = 1
D.HP -= youDamageDone2
A << "You did [youDamageDone2] damage to [D.Name]!"
A.deathCheck(D)
else
A << "You miss [D.Name]!"
if(D.Doing == 0) //ERROR
call(/mob/proc/AttackTwo)(D,A)
D.Doing = 1 //ERROR
A.attackDelay = A.AttackDelay
else if(istype(D,/mob/Player)) //If player
while(A)
while(D)
if(!D in oview(1,A)) break
WAIT
if(A.attackDelay >= 1) //ERROR
goto WAIT
var/youHitOrNot = rand(A.Rogueness+2,D.Evasion-2)
if(youHitOrNot > D.Evasion)
var/youDamageDone = rand((A.Strength / A.Level) + 1,(A.Strength / A.Level) + 3)
var/youDamageDone2 = youDamageDone - D.Toughness
if(youDamageDone2 < 1) youDamageDone2 = 1
D.HP -= youDamageDone2
D << "[A.Name] did [youDamageDone2] damage to you!"
A.deathCheck(D)
else
D << "[A.Name] misses you!"
A.attackDelay = A.AttackDelay
break
A.Doing = 0
//END ATTACK PROCEDURE
Verb Code:
mob
Player
verb
//BEGIN ATTACK VERB
Attack(mob/M in oview(1))
set category="Verbs"
if(!istype(M,/mob/Attackable)&&!istype(M,/mob/Player))
return 0
call(/mob/proc/AttackTwo)(usr,M)
//END ATTACK VERB
Problem description: Read the context for errors, they happen as soon as it dies....
Uhhh could you place in comments which lines in the code the errors took place on?