This was my easy way to log shards to a file:
Yet it appends fine, and with that warning. I always want to keep the compiling warning-free. Yes, I know its not a decent way to log file, but it was a quick fix, since I forgot that the shard_monitor channel didn't append to log. Hm, how about explaining why it said that warning? Heh, never did learn *nix or C through a class. Just through testing.
act_obj.c: In function `get_obj':
act_obj.c:171: warning: implicit declaration of function `shardmon'
sprintf(buf, "%s(%d) got a shard from in %s(%d) in room %d",
ch->name, IS_NPC(ch) ? ch->pIndexData->vnum : 0, container->name, container->pIndexData->vnum, ch->in_room->vnum );
shardmon( ch, buf );
void shardmon( CHAR_DATA *ch, char *argument )
{
if ( argument[0] == '\0' )
return;
append_file( ch, SHARDMON_FILE, argument );
return;
}
Yet it appends fine, and with that warning. I always want to keep the compiling warning-free. Yes, I know its not a decent way to log file, but it was a quick fix, since I forgot that the shard_monitor channel didn't append to log. Hm, how about explaining why it said that warning? Heh, never did learn *nix or C through a class. Just through testing.