Re: [Circle] [Code-Help] Help? Please?

From: Daniel Koepke (dkoepke@california.com)
Date: 11/11/96


On Mon, 11 Nov 1996, Corey Hoitsma wrote:

> 
> 
> Hello!
> I'm getting stuck on this dang crash bug..
> 
> this is what happened:
> 
> I would be fighting a mummy (with the alias of corpse)
> with no weapon. Then I'd wield a weapon that had a
> weapon spell on it, and right before the
> next round (which would be the first for that weapon)
> it crashes! I have no idea why, but it just dies.
> 
> Anyways, here's what I get in gdb:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x802ca8c in hit (ch=0x8540200, victim=0x0, type=-1) at fight.c:971
                                         ^^^
You're passing a NULL to hit().  You're probably running into a
problem similar to that encountered by people adding multi-hit
and forgetting to make sure FIGHTING(ch) is set after each hit.
Do an "if (FIGHTING(ch))" before the hit() call(s) after your
spell has ben cast.  BTW, 0x0 is NULL.


--
Daniel Koepke
dkoepke@california.com
Forgive me father, for I am sin.


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



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