On Sun, 28 Jan 2001, Kaun Lazaro wrote: > last part of my code is the for statement I added for multi-attacks: > > for (i = 0; i < att; i++) { > hit(ch, FIGHTING(ch), dam, TYPE_UNDEFINED); > } What happens if a hit() kills the person they're fighting while the attacker still has attacks left? You want: for (i = 0; FIGHTING(ch) && i < att; i++) hit(ch, FIGHTING(ch), dam, TYPE_UNDEFINED); > do_kick(ch, FIGHTING(ch)); I don't think you want to have them hit and then kick the person every round; if you don't, consider a different approach. Either way, you should ensure FIGHTING(ch) is not NULL (i.e., the victim hasn't been killed), yet. > which is: > do_kick(struct char_data * ch, struct char_data * vict) { Not unless you've changed it. I believe your problem amounts to you killing the victim earlier and failing to check if they've died. This has been brought up several times in the past: the list archive is your friend. -dak -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/03/01 PST