Re: skill bug

From: Jaco van Iterson (J.C.vanIterson@ET.TUDelft.NL)
Date: 05/01/95


I've no idea why your code isn't working (no surprice, I haven't looked 
at it), it can be anything.
What you must do is read the hacker.doc, it shows you how to examin the 
coredump.
If you do a backtrace on the coredump you'll know exactly at which line 
your program did crash (and more). Debugging will be a lot easyer after that.

Groetjes van........
Jaco


On Sun, 30 Apr 1995 SROWAN@WVNVM.WVNET.EDU wrote:

> 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