Re: [CODING] Fight System Crash, in act.offensive

From: John (witpens@optushome.com.au)
Date: 12/11/01


Chi ranted:-
if (GET_OBJ_VAL(GET_EQ(ch, WEAR_WIELD), 3) == 15)
 {
  send_to_char("Gun",ch);
 }// If wielding a gun, works fine
// If not, CRASH
 if ((GET_POS(ch) == POS_STANDING) && (vict != FIGHTING(ch))) {
// Num attackign is a switch set earlier in do_hit
  while (num_attacking > 0)
   {
    hit(ch, vict, TYPE_UNDEFINED);
    WAIT_STATE(ch, PULSE_VIOLENCE + 2);
   num_attacking -= 1;
   }//end while
    }

Why are you using WAIT_STATE in your while command?? If you want
multiple attacks in the same round, get rid of WAIT_STATE. Judging from
your code, if the player has 3 attacks, he wont be able to make any
commands for six rounds.

Dont know if it will fix your crash, but I cant see anything else since
you cut so many of your code out.

PS: I assume you mean an ELSE if ((GET_POS.... otherwise your gun attack
will pulse through like all other attacks.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/24/03 PDT