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

