mob
verb
Start_Battle()
src.Battle()
mob
proc
Battle(mob/M in oview(1))
switch(input("Battle") in list ("Attack", "Item", "Run"))
if("Attack")
M.hp -= src.str
src << "You hit [M] for [src.str] damage!"
M.Death()
Problem description: I keep getting this error: runtime error:
Cannot read null.hp
proc name: Battle (/mob/proc/Battle)
source file: battle.dm,6
usr: Mecha Destroyer JD (/mob)
src: Mecha Destroyer JD (/mob)
call stack:
Mecha Destroyer JD (/mob): Battle(null)
Mecha Destroyer JD (/mob): Start Battle()
You should do this:
I think that should work.