char *string;
int value1;
if( value1 < strlen(string) )
char *string;
int value1;
if( value1 < (int)(strlen(string)) )
char *string;
int value1;
if( value1 < strlen(string) )
char *string;
size_t value1;
if( value1 < (strlen(string)) )
void group_gain( CHAR_DATA *ch, CHAR_DATA *victim )
{
char buf[MAX_STRING_LENGTH];
CHAR_DATA *gch, *gch_next;
CHAR_DATA *lch;
int xp;
int members;
int group_levels;
int templevel;
/*
* Monsters don't get kill xp's or alignment changes.
* P-killing doesn't help either.
* Dying of mortal wounds or poison doesn't give xp to anyone!
*/
if (!ch || !victim)
{
bugf("%s have nonexistent ch and/or victim",__FUNCTION__);
return;
}
if ( IS_NPC(ch) || victim == ch )
return;
members = 0;
group_levels = 0;
for ( gch = ch->in_room->people; gch ; gch = gch->next_in_room )
{
if ( is_same_group( gch, ch ) )
{
members++;
if (!IS_NPC(gch) && gch->level >= 90)
templevel = 90;
else
templevel = gch->level;
//group_levels += IS_NPC(gch) ? gch->level / 2 : gch->level;
group_levels += IS_NPC(gch) ? templevel / 2 : templevel;
}
}
if ( members == 0 )
{
bugf( "Group_gain: members %d.", members );
members = 1;
if (!IS_NPC(ch) && ch->level >= 90)
templevel = 90;
else
templevel = ch->level;
//group_levels = ch->level ;
group_levels = templevel ;
}
lch = ch->leader ? ch->leader : ch;
for ( gch = ch->in_room->people; gch ; gch = gch_next )
{
OBJ_DATA *obj;
OBJ_DATA *obj_next;
gch_next = gch->next_in_room;
//if ( !is_same_group( gch, ch ) || IS_NPC(gch))
if ( !is_same_group( gch, lch ) || IS_NPC(gch))
continue;
/*
if (IS_CLAN(gch) && !IS_CLAN(lch))
{
send_to_char("You cant group with this person.\n\r",ch);
continue;
}
if (IS_CLAN(lch) && !IS_CLAN(gch))
{
send_to_char("You cant group with this person.\n\r",ch);
continue;
}
*/
if ( gch->level - lch->level >= 5 )
{
send_to_char( "You are too high for this group.\n\r", gch );
continue;
}
if ( gch->level - lch->level <= -5 )
{
send_to_char( "You are too low for this group.\n\r", gch );
continue;
}
xp = xp_compute( gch, victim, group_levels );
if (gch->level >= 90)
{
gain_primal(gch,xp);
}
else
{
sprintf( buf, "{GYou receive{W =%d= {GExperience from that kill.{x\n\r", xp );
send_to_char( buf, gch );
gain_exp( gch, xp );
}
for ( obj = ch->carrying; obj != NULL; obj = obj_next )
{
obj_next = obj->next_content;
if ( obj->wear_loc == WEAR_NONE )
continue;
if ( ( IS_OBJ_STAT(obj, ITEM_ANTI_EVIL) && IS_EVIL(ch) )
|| ( IS_OBJ_STAT(obj, ITEM_ANTI_GOOD) && IS_GOOD(ch) )
|| ( IS_OBJ_STAT(obj, ITEM_ANTI_NEUTRAL) && IS_NEUTRAL(ch) ) )
{
act( "You are zapped by $p.", ch, obj, NULL, TO_CHAR );
act( "$n is zapped by $p.", ch, obj, NULL, TO_ROOM );
obj_from_char( obj );
obj_to_room( obj, ch->in_room );
}
}
}
//free_string(buf);
//DISPOSE(buf);
return;
}
I get theese alot when compiling is there a real problem? in that case how to fix them? doing (unsigned) before the variables?