[CODING] Fight System Crash, in act.offensive

From: Chi Hue (Mystikarc@softhome.net)
Date: 12/11/01

Im putting in a new weapin type, a gun.
Now, I have edited the fight alot, but it remains generally the same, but loops thru the combat (in fight.c as well afrter offensive). The problem, is I want it to check object wielded, if its a Gun, it does gun fight, if its not a gun, (else), it does melee. Right now, it sends char "gun" then finishes the fight 
(like it should,tested without gun code). 
When I use a non-gun object, it Stalls...then crashes.
Im sure its simple, but I cant for the life of me tell why its crashing...also, If I remove gun in fight, it calls fight.c melee code fine (like it should).
--snip of act.offensive.c , in do_hit()

if (GET_OBJ_VAL(GET_EQ(ch, WEAR_WIELD), 3) == 15)
 }// 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);
   num_attacking -= 1;
   }//end while
-- End Snip--
any help appreciated as always... Iv een testing awhile.
I actually had it working with the guns, but it crashed when not a gun on offensive...fight.c seemed fine, but cant tell for sure untill I get offensive working,

   | 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