Re: [newbie] need some further help with multihit

From: russ brown (
Date: 05/04/02

From: SoulReaper Is here <death_comes_to_all@HOTMAIL.COM>
>I have successfully implemented multihit and it works, but i get syserr:
>using '<<ch>->player_specials->saved.skills[141]> at fight.c:943 ...
>i have checked it out and put a !IS_NPC || in the line
>if (!IS_NPC(ch) || GET_SKILL(ch, SKILL_SECOND_ATTACK) >= number(1, 101)) {
>but I still get the same error.. does anyone know how to do?
So you are checking that  1) ch is not an NPC
OR  that                               2) ch has SKILL_SECOND_ATTACK >=

I can't be sure from only one line of code, but I think you want to enforce
of those conditions, not just one. Try using the AND operator:

if (!IS_NPC(ch) && GET_SKILL(ch, SKILL_SECOND_ATTACK) >= number(1, 101)) {

If this doesn't help, post more of the code in context. Also don't forget to
check that the
victim is still alive before every extra attack, because trying to damage a
corpse will
crash the mud. There should be tons of stuff on this in the archives (hint,
hint), since almost
everyone who adds multiple attacks runs into this problem.


   | FAQ: |
   | Archives: |
   | Newbie List:   |

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