Re: Auto diag...

From: Adam Beytin (mbeytin@UMD5.UMD.EDU)
Date: 08/02/97


> I think I am just overlooking something silly here.
>
> When the mob I am fighitng is dead, it tries to diag them and crashes out
> the MUD. I thought the GET_POS would clear that up, but it is still
> crashing. Can anyone offer advice? Thanks.
You are overlooking something silly ;)  When the mob is there, then ch is
null, and that's why it crashes.

change
  hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
    if (!IS_NPC(ch) && (GET_POS(FIGHTING(ch)) > POS_STUNNED))
      diag_char_to_char(FIGHTING(ch), ch);
to
  hit(ch, FIGHTING(ch, TYPE_UNDEFINED);
    if (ch && !IS_NPC(ch) && (GET_POS(FIGHTING(ch)) > POS_STUNNED))
      diag_char_to_char(FIGHTING(ch), ch);

I think that's right.., hope it works


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST