void disarm( CHAR_DATA *ch, CHAR_DATA *victim )
{
OBJ_DATA *obj;
if ( ( obj = get_eq_char( victim, WEAR_WIELD ) ) == NULL )
return;
if ( IS_OBJ_STAT(obj,ITEM_NOREMOVE))
{
act("$S weapon won't budge!",ch,NULL,victim,TO_CHAR);
act("$n tries to disarm you, but your weapon won't budge!",
ch,NULL,victim,TO_VICT);
act("$n tries to disarm $N, but fails.",ch,NULL,victim,TO_NOTVICT);
return;
}
act( "$n DISARMS you and sends your weapon flying!",
ch, NULL, victim, TO_VICT );
act( "You disarm $N!", ch, NULL, victim, TO_CHAR );
act( "$n disarms $N!", ch, NULL, victim, TO_NOTVICT );
obj_from_char( obj );
if ( IS_OBJ_STAT(obj,ITEM_NODROP) || IS_OBJ_STAT(obj,ITEM_INVENTORY) )
obj_to_char( obj, victim );
else
{
obj_to_room( obj, victim->in_room );
if (IS_NPC(victim) && victim->wait == 0 && can_see_obj(victim,obj))
get_obj(victim,obj,NULL);
}
return;
}
I did what you said and like now all of disarm is buggy dont know if this was like it before or what not but here are the errors.
C:\MUD ROM\src\fight.c(2232) : error C2143: syntax error : missing ';' before 'type'
C:\MUD ROM\src\fight.c(2236) : error C2065: 'obj' : undeclared identifier
C:\MUD ROM\src\fight.c(2236) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct obj_data *'
C:\MUD ROM\src\fight.c(2236) : warning C4047: '==' : 'int ' differs in levels of indirection from 'void *'
C:\MUD ROM\src\fight.c(2239) : error C2223: left of '->extra_flags' must point to struct/union
C:\MUD ROM\src\fight.c(2253) : warning C4047: 'function' : 'struct obj_data *' differs in levels of indirection from 'int '
C:\MUD ROM\src\fight.c(2253) : warning C4024: 'obj_from_char' : different types for formal and actual parameter 1
C:\MUD ROM\src\fight.c(2254) : error C2223: left of '->extra_flags' must point to struct/union
C:\MUD ROM\src\fight.c(2254) : error C2223: left of '->extra_flags' must point to struct/union
C:\MUD ROM\src\fight.c(2255) : warning C4047: 'function' : 'struct obj_data *' differs in levels of indirection from 'int '
C:\MUD ROM\src\fight.c(2255) : warning C4024: 'obj_to_char' : different types for formal and actual parameter 1
C:\MUD ROM\src\fight.c(2258) : warning C4047: 'function' : 'struct obj_data *' differs in levels of indirection from 'int '
C:\MUD ROM\src\fight.c(2258) : warning C4024: 'obj_to_room' : different types for formal and actual parameter 1
C:\MUD ROM\src\fight.c(2259) : warning C4047: 'function' : 'struct obj_data *' differs in levels of indirection from 'int '
C:\MUD ROM\src\fight.c(2259) : warning C4024: 'can_see_obj' : different types for formal and actual parameter 2
C:\MUD ROM\src\fight.c(2260) : warning C4047: 'function' : 'struct obj_data *' differs in levels of indirection from 'int '
C:\MUD ROM\src\fight.c(2260) : warning C4024: 'get_obj' : different types for formal and actual parameter 2
I am sorry for not using the code tag too it didnt show with tags and stuff didnt know there where some. |