pt 2:
else if ( victim == ch )
{
if( !social->char_auto || !social->others_auto)
{
send_to_char("Incomplete social, try again soon.\n\r", ch);
sprintf(buf, "Social %s", social->name);
bug(buf);
return TRUE;
}
act( AT_SOCIAL, social->others_auto, ch, NULL, victim, TO_ROOM );
act( AT_SOCIAL, social->char_auto, ch, NULL, victim, TO_CHAR );
}
else
{
if( !social->char_found || !social->others_found || !social->vict_found)
{
send_to_char("Incomplete social, try again soon.\n\r", ch);
sprintf(buf, "Social %s", social->name);
bug(buf);
return TRUE;
}
act( AT_SOCIAL, social->others_found, ch, NULL, victim, TO_NOTVICT );
act( AT_SOCIAL, social->char_found, ch, NULL, victim, TO_CHAR );
act( AT_SOCIAL, social->vict_found, ch, NULL, victim, TO_VICT );
if ( !IS_NPC(ch) && IS_NPC(victim)
&& !IS_AFFECTED(victim, AFF_CHARM)
&& IS_AWAKE(victim)
&& !HAS_PROG(victim->pIndexData, ACT_PROG) )
{
switch ( number_bits( 4 ) )
{
case 0:
if (IS_EVIL(ch) && !is_safe(victim, ch, TRUE))
/* was IS_EVIL(ch) ||.... didn't make sense to me - FB */
multi_hit( victim, ch, TYPE_UNDEFINED );
else
if ( IS_NEUTRAL(ch) )
{
act( AT_ACTION, "$n slaps $N.", victim, NULL, ch, TO_NOTVICT );
act( AT_ACTION, "You slap $N.", victim, NULL, ch, TO_CHAR );
act( AT_ACTION, "$n slaps you.", victim, NULL, ch, TO_VICT );
}
else
{
act( AT_ACTION, "$n acts like $N doesn't even exist.", victim, NULL, ch, TO_NOTVICT );
act( AT_ACTION, "You just ignore $N.", victim, NULL, ch, TO_CHAR );
act( AT_ACTION, "$n appears to be ignoring you.", victim, NULL, ch, TO_VICT );
}
break;
case 1: case 2: case 3: case 4:
case 5: case 6: case 7: case 8:
act( AT_SOCIAL, social->others_found, victim, NULL, ch, TO_NOTVICT );
act( AT_SOCIAL, social->char_found, victim, NULL, ch, TO_CHAR );
act( AT_SOCIAL, social->vict_found, victim, NULL, ch, TO_VICT );
break;
case 9: case 10: case 11: case 12:
act( AT_ACTION, "$n slaps $N.", victim, NULL, ch, TO_NOTVICT );
act( AT_ACTION, "You slap $N.", victim, NULL, ch, TO_CHAR );
act( AT_ACTION, "$n slaps you.", victim, NULL, ch, TO_VICT );
break;
}
}
}
/* Replace the chars in the ignoring list to the room
note that the ordering of the players in the room might change */
for(victim = remfirst; victim; victim = remtemp)
{
remtemp = victim->next_in_room;
char_to_room(victim, ch->in_room);
}
return TRUE;
}
I'm getting this error:
interp.c: In function `check_social':
interp.c:814: warning: `victim' might be used uninitialized in this function
I've marked the line in error at the very top of the first post.
-Toy
|