I attempted to change the 'whois' information today. Basically, I just made it more like a table type format, and more condusive to some planned additions later on (i.e. kingdom, guild, and email listing). I don't get any compile errors on it. However, when I attempt to use the whois command on the mud, the hard drive buzzes briefly and disconnects everyone from the server, giving no error messages whatsoever.
In act_info.c, after the line:
set_pager_color( AT_GREY, ch );
I put the old code in comment tags, and inserted the new code:
pager_printf(ch, "\n\n\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-WHOIS %s-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n", victim->name);
pager_printf(ch, "| Name: | %s *************************************** | Gender: | %s \n",
victim->name,
victim->sex == SEX_MALE ? "Male" :
victim->sex == SEX_FEMALE ? "Female" : "Neutral"
);
pager_printf(ch, "| Level: | %s ******************************************** | Race: | %s \n",
victim->level,
capitalize(race_table[victim->race]->race_name)
);
pager_printf(ch, "| Class: | %s *************************************** | Age: | %s \n",
class_table[victim->class]->who_name,
get_age(victim)
);
pager_printf(ch, "| Kingdom: | None *************************************** | Guild: | None \n");
pager_printf(ch, "----------------------------------------------------------------------------------\n");
if(victim->pcdata->homepage && victim->pcdata->homepage[0] != '\0')
pager_printf(ch, "| Webpage: | %s\n",
show_tilde( victim->pcdata->homepage ) );
else
pager_printf(ch, "| Webpage: | Unlisted\n");
pager_printf(ch, "| Email: | Unlisted\n");
pager_printf(ch, "--------------------------------------AUTOBIOGRAPHY-------------------------------\n");
if(victim->pcdata->bio && victim->pcdata->bio[0] != '\0')
pager_printf(ch, "\n%s\n\n",
victim->pcdata->bio);
else
pager_printf(ch, "\nNo biographical information available for %s at this time.\n\n",
victim->name );
if(IS_IMMORTAL(ch))
{
pager_printf(ch, "############################## -INFO FOR IMMORTALS- ############################\n");
pager_printf(ch, "| Mob Kills: | %s **************************** | Mob-Caused Deaths: | %s \n",
victim->pcdata->mkills,
victim->pcdata->mdeaths
);
pager_printf(ch, "| Player Kills: | %s ********************** | Player-Caused Deaths: | %s \n",
victim->pcdata->pkills,
victim->pcdata->pdeaths
);
if(xIS_SET(victim->act, PLR_SILENCE) || xIS_SET(victim->act, PLR_NO_EMOTE)
|| xIS_SET(victim->act, PLR_NO_TELL) || xIS_SET(victim->act, PLR_THIEF)
|| xIS_SET(victim->act, PLR_KILLER) )
{
pager_printf(ch, "----------------------------------------------------------------------------------\n");
sprintf(buf2, "This player has the following flags set:");
if(xIS_SET(victim->act, PLR_SILENCE))
strcat(buf2, " silence");
if(xIS_SET(victim->act, PLR_NO_EMOTE))
strcat(buf2, " noemote");
if(xIS_SET(victim->act, PLR_NO_TELL) )
strcat(buf2, " notell");
if(xIS_SET(victim->act, PLR_THIEF) )
strcat(buf2, " thief");
if(xIS_SET(victim->act, PLR_KILLER) )
strcat(buf2, " killer");
strcat(buf2, ".\n\r");
send_to_pager(buf2, ch);
pager_printf(ch, "----------------------------------------------------------------------------------\n");
}
if ( victim->desc && victim->desc->host[0]!='\0' )
{
pager_printf(ch, "----------------------------------------------------------------------------------\n");
sprintf (buf2, "%s's IP info: %s ", victim->name, victim->desc->host);
if (get_trust(ch) >= LEVEL_GOD)
strcat (buf2, victim->desc->user);
strcat (buf2, "\n\r");
send_to_pager(buf2, ch);
}
}
pager_printf(ch, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-WHOIS %s-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n", victim->name);
}
Sorry bout the length of this, but I don't even know what the error is, let alone what's causing it. Thanks for your help on this =) |