skill bug

SROWAN@WVNVM.WVNET.EDU
Date: 04/30/95


Hello,
I'm currently trying to code a "circle" skill for thieves that allows them
to basically backstab at double damage while  fighting.  The code compiles
but I keep getting a segmentation fault that dumps the core.  The code checks
to see if the character is fighting, and if he's wielding a weapon..if so, is
if a piercing weapon, etc.  all the if statements work, I've checked those.
using dbx I'm told that the file fight.c can't be found using current directory
list..but the mud crashes in the void hit function in fight.c...
here's the code beyond the if statements.....

prob = GET_SKILL(ch, SKILL_CIRCLE) - GET_LEVEL(vict) +GET_DEX(ch);
percent = number(1, 101);

if (prob > percent) {
    hit(ch, vict, SKILL_CIRCLE); }
else {
     damage(ch, vict, 0, SKILL_CIRCLE); }
  WAIT_STATE(ch, PULSE_VIOLENCE * 3);
}

in fight.c  void hit  (section where ch misses)
if (type == SKILL_CIRCLE)
   damage(ch, vict, 0, SKILL_CIRCLE);

(when ch hits)
if (type == SKILL_CIRCLE) {
    dam *= 2;
    damage(ch, vict, dam, SKILL_CIRCLE); }

in addition, I've added messages to the message file...any idea why this isn't
working?

Steve



This archive was generated by hypermail 2b30 : 12/07/00 PST