View Single Post
Old June 25, 2020, 07:14   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,454
Donated: $60
Nick will become famous soon enough
I think your problem is here:

Quote:
Originally Posted by Celiend View Post
Code:
            	/* Hurt the monster */
            if(monster_is_undead)
            {
You need
Code:
if(monster_is_undead(mon))
Currently the if statement always evaluates true because the statement in parentheses is non-zero (it has to be, because the function exists); you want the return value of the function called with "mon" as the argument.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote