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

From: Jeremy Maloney (vagabond@newhaven.orisis.net)
Date: 08/12/00


Hello all, I recently attempted to add in the multiattack snippet,
ie, putting in double and triple hit. Unfortunately something has
gone wierd on me, I am developing on Circlemud 3.0 patch level 14,
with linux redhat 6.2 as an operating system.

I got this error:

make ../bin/circle
make[1]: Entering directory `/home/vagabond/xanth/src'
gcc -c -g -O2 -Wall  fight.c
fight.c: In function `perform_violence':
fight.c:1002: structure has no member named `specials'
fight.c:1003: structure has no member named `specials'
make[1]: *** [fight.o] Error 1
make[1]: Leaving directory `/home/vagabond/xanth/src'
make: *** [all] Error 2

/* 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.
*/

------------|Code below|------------------
/* This is the addition of the Double/Triple attack code - Orion */

        if (AWAKE(ch) && (ch->in_room == ch->specials.fighting->in_room))
{
           hit(ch, ch->specials.fighting, TYPE_UNDEFINED);

        if((GET_SKILL(ch, SKILL_DOUBLE) > 0)) {
           if(GET_SKILL(ch, SKILL_DOUBLE) > number(1,200)-5*GET_LEVEL(ch))

      if(FIGHTING(ch));
                 hit(ch,FIGHTING(ch),TYPE_UNDEFINED);
        }
        if((GET_SKILL(ch, SKILL_TRIPLE) > 0)) {
           if(GET_SKILL(ch, SKILL_TRIPLE) >
number(1,200)-10*GET_LEVEL(ch))

      if(FIGHTING(ch));
                 hit(ch,FIGHTING(ch),TYPE_UNDEFINED);
        }
         else {
         stop_fighting(ch);
  }
 }
}
Anyone have any idea?
Orion


--,--'--,--'--,--'--,--'--,--'--,'--,--'--,--'--,--
The Vagabond Admin
(vagabond@newhaven.orisis.net)
newhaven.orisis.net 4202
http://newhaven.orisis.net/~vagabond/index.htm


     +------------------------------------------------------------+
     | 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