try this func instead, and i'll point out the errors later:
void disarm( struct char_data *ch, struct char_data *victim )
{
struct obj_data *obj;
if ( (obj = victim->equipment[WIELD]) == NULL ) {
act( "$S weapon seems to be $S hands.", FALSE, ch, 0, victim, TO_CHAR);
return;
} /*needed to be held in braces, and $S instead of $s, victim had */
/*to be defined in act() */
/* What is this code for??? Remove it */
act( "$n tries to disarm you, but $p won't come off your hand!",
FALSE, ch, 0, 0, TO_VICTIM);
act( "You try to knock the weapon from $S hand, but it is
useless!", FALSE, ch, 0, 0, TO_CHAR);
return;
*/
act( "$n disarms you and sends your weapon flying!", TRUE, ch, 0, victim, TO_VICTIM);
/* if its TO_VICT victim needs to be defined */
act( "You have managed to disarm $N!", TRUE, ch, 0, victim, TO_CHAR );
/* again define VICTIM!!! */
act( "$n disarms $N!", TRUE, ch, 0, 0, TO_ROOM );
/* guess what, define victim or else $N is NULL */
obj_from_char( obj );
obj_to_room( obj, victim->in_room );
/* dunno if these are proper calls or not, check them before compiling */
return;
}
This archive was generated by hypermail 2b30 : 12/07/00 PST