Re: Autoskill help

From: The Luthers (Dana and Todd) (luthers@ex-pressnet.com)
Date: 01/28/01


From: "Kaun Lazaro" <circle_777@HOTMAIL.COM>
> first off sorry to the list, I didn't mean to send it in html format, my
> deepest apolagies (sp?) and second to Del, if you look I left chunks of
code
> out, and kick() is a function in which victim is equal to fighting(ch) as
> per its call in perform violance :)

Your post was a little unclear, I had to re-read it a few times myself to
realize that you were then showing the kick function. Did you check for if
the player died during your multiple attacks? Sounds like your vict is dying
before they get kicked, so its' the ol' trying to damage a corpse problem...

Your code was:

> 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);
>   }
>
> then the kick code:
>
>   do_kick(ch, FIGHTING(ch));

which calls :

> do_kick(struct char_data * ch, struct char_data * vict) {
>
>   does all the percent and probability stuff and then:
>
>   hit(ch, vict, GET_LEVEL(ch)/2, SKILL_KICK);
>   ^^^ this is where gdb returns the error that the vict has no value??
> }

I don't see anything checking to see if your victim is still alive ...

at the least, I think that changing the

do_kick(ch, FIGHTING(ch));

to

if (FIGHTING(ch) != null)
    do_kick(ch, FIGHTING(ch));
else {
    log("Atteping to kick null fighting character in autoskill...");
    return;
}

would help to isolate that possibility, though ideally you'd check your
damage returns to see if you've killed the person or not.

I hope that is at least a little helpful,
Dana

--
   +---------------------------------------------------------------+
   | 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