Re: [Code] [snippet help] [should be simple]

From: Brandon Brown (BBrown@uasoft.com)
Date: 08/12/00


> /* Now my first guess was that utils.h was not included, so I
>    checked that first. It's there.  So then I said well hmm,
>    and I started looking at the code for possible problems.
>    Unfortunately, I didn't find any. So the code I added to
>    fight.c is below.
> */
Why would utils.h have anything to do with it?

> fight.c:1002: structure has no member named `specials'
The problem is that at line 1002 the structure you're calling doesn't have a
member called 'specials' to get the 'fighting' from.  Right, so what's this
all mean.

>    if (AWAKE(ch) && (ch->in_room == ch->specials.fighting->in_room))
> {
>           hit(ch, ch->specials.fighting, TYPE_UNDEFINED);
This is where the problem is.  There is no (ch)->specials member.  But there
is a
(ch)->char_specials member.  Try replacing it with that, or simply use the
macro FIGHTING(ch).

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  B. Brown                                                     TimeTraveller
  Senior Programmer                                      'Lost in Time,
  U&A Software InterActive                            'and Loving it!'
  http://www.uasoft.com/staff/bbrown/         http://www.uasoft.com/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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



This archive was generated by hypermail 2b30 : 04/11/01 PDT