Ok Here is a little snip of the return from find_spell

106            return sn;
(gdb) p sn
$28 = 287
(gdb) n
111     }
(gdb) n
do_stop (ch=0x415e32c0, argument=0x415e093e "diamond") at magic.c:378
378        if (is_affected(ch,sn))
(gdb) p sn
$29 = 0

The function finds the correct sn(287) but when it passes it back to the
do_stop function it reverts to 0

At a loss...still looking tho.

-K

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mervine,
Keith
Sent: Monday, November 08, 2004 2:23 PM
To: Valnir; [email protected]
Subject: RE: Finding an affect by name and stopping it.


None at all.  Im stepping through it now tho.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Valnir
Sent: Monday, November 08, 2004 2:15 PM
To: [email protected]
Subject: Re: Finding an affect by name and stopping it.


Have you made any changed to the find_spell function? I would say it's
got 
to be an issue there.

- Valnir

----- Original Message ----- 
From: "Mervine, Keith" <[EMAIL PROTECTED]>
To: "Mervine, Keith" <[EMAIL PROTECTED]>; "Jason Gauthier" 
<[EMAIL PROTECTED]>; <[email protected]>
Sent: Monday, November 08, 2004 2:07 PM
Subject: RE: Finding an affect by name and stopping it.


Ok on furthur inspection it appears that the sn is getting set to 0.

K

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mervine,
Keith
Sent: Monday, November 08, 2004 2:05 PM
To: Jason Gauthier; [email protected]
Subject: RE: Finding an affect by name and stopping it.


I'm sorry... In looking at it with gdb it appears it cannot strip it.

-----Original Message-----
From: Jason Gauthier [mailto:[EMAIL PROTECTED]
Sent: Monday, November 08, 2004 2:00 PM
To: Mervine, Keith; [email protected]
Subject: RE: Finding an affect by name and stopping it.


What doesn't work? Stripping the affect or finding it?

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Mervine, Keith
> Sent: Monday, November 08, 2004 1:51 PM
> To: [email protected]
> Subject: Finding an affect by name and stopping it.
>
> Greetings,
> I'm not sure if this has been done before, but I'm
> trying to let players stop affects on themselves by issusing
> a command.
>
> What I have so far(from looking at other code) doesn't appear to work.
> Can someone take a look at it and advise me please?
>
> The syntax would be something like "stop displacement"
>
> Thanks!
> -K
>
> void do_stop( CHAR_DATA *ch, char *argument ) {  char
> arg[MAX_INPUT_LENGTH];  AFFECT_DATA *paf, *paf_last = NULL;
> char buf[MAX_STRING_LENGTH];  int sn;
>
>    argument = one_argument( argument, arg );
>
>    if ( arg[0] == '\0' )
>    {
>     if ( ch->affected != NULL )
>     {
>      send_to_char( "You are maintaining the following psi
> powers:\n\r", ch );
>      for ( paf = ch->affected; paf != NULL; paf = paf->next )
>      {
>       if (skill_table[paf->type].group == GROUP_PSI)
>       {
>        sprintf( buf, "@[EMAIL PROTECTED]
> %d/tick\n\r",skill_table[paf->type].name,skill_table[paf->type
> ].min_mana
> );
>        send_to_char( buf,ch );
>        paf_last = paf;
>       }
>      }
>     }
>     else
>     {
>      send_to_char("You are not maintaining any psi powers.\n\r",ch);
>     }
>     return;
>    }
>
>    if ( sn = find_spell( ch,arg ) < 0 )
>     {
>         send_to_char( "You don't of know any powers by that
> name.\n\r", ch );
>         return;
>     }
>
>    if (is_affected(ch,sn))
>    {
>     affect_strip(ch,sn);
>     if ( skill_table[sn].msg_off )
>     {
>      send_to_char( skill_table[sn].msg_off, ch );
>      send_to_char( "\n\r", ch );
>     }
>     return;
>    }
> }
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>

-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom

-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom


-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom

-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to