pardon me, i'm going to use lines of dashes to break this into more bite-sized chunks for anyone reading. i'm a little here-and-there with my thinking at the moment. i just got off work where i spend all day speaking a non native language and my head is still not quite back on straight.
our command list has stopped loading. recently, we added two new PLR flags (PLR_RP and PLR_SUNFISH). after implimenting the code which would activate PLR_RP similarly to PLR_AFK as a do_roleplay, this error started up. this is what i get in the logs:
Mon Jul 2 06:04:24 2007 :: Loading commands
Mon Jul 2 06:04:24 2007 :: [*****] BUG: Fread_command: no match: #COMMAND
after tracking this down to tables.c's void fread_command( FILE *fp ), i figured it had to do with the PLR_RP / PLR_SUNFISH codes. the odd thing is, the only codes which are 'forgotten' by this bug are do_run and do_revert...all others survived just fine.
-------------------------------------
in any case, here's the code from 'do_roleplay' that might be causing the issue.
/* the RP flag */
void do_roleplay( CHAR_DATA *ch, char *argument )
{
if ( IS_NPC(ch) )
return;
if xIS_SET(ch->act, PLR_RP)
{
xREMOVE_BIT(ch->act, PLR_RP);
send_to_char( "You are no longer flagged Roleplaying.\n\r", ch );
act(AT_GREY,"$n stopped Roleplaying.", ch, NULL, NULL, TO_CANSEE);
}
else
{
xSET_BIT(ch->act, PLR_RP);
send_to_char( "You are now flagged as Roleplaying.\n\r", ch );
act(AT_GREY,"$n has started Roleplaying.", ch, NULL, NULL, TO_CANSEE);
return;
}
}
------------------------------------------
here's the snippet from mud.h with the player flags too, just in case i'm missing something crucial. i looked around to see if there's a max allowed player flag but i couldn't find any hint of such a max. then again...this is smaug, with such classic comments as /* delete this later */, so who knows. it could exist hidden away somewhere.
/*
* ACT bits for players.
*/
typedef enum
{
PLR_IS_NPC,PLR_BOUGHT_PET, PLR_SHOVEDRAG, PLR_AUTOEXIT, PLR_AUTOLOOT,
PLR_AUTOSAC, PLR_BLANK, PLR_OUTCAST, PLR_BRIEF, PLR_COMBINE, PLR_PROMPT,
PLR_TELNET_GA, PLR_HOLYLIGHT, PLR_WIZINVIS, PLR_ROOMVNUM, PLR_SILENCE,
PLR_NO_EMOTE, PLR_ATTACKER, PLR_NO_TELL, PLR_LOG, PLR_DENY, PLR_FREEZE,
PLR_THIEF, PLR_KILLER, PLR_LITTERBUG, PLR_ANSI, PLR_RIP, PLR_NICE, PLR_FLEE,
PLR_AUTOGOLD, PLR_AUTOMAP, PLR_AFK, PLR_INVISPROMPT, PLR_RP, PLR_SUNFISH
} player_flags;
any help at all would be welcomed with abject grovelling. i'm exhausted and our main coder has completely crashed from exhaustion these past few days.
-----------------------------------
here are the commands.dat entries for all three, in case it's something simplex i'm just stupidly overlooking. they *are* in alphabetical order in commands.dat.
#COMMAND
Name run~
Code do_run
Position 112
Level 0
Log 0
End
#COMMAND
Name roleplay~
Code do_roleplay
Position 100
Level 4
Log 0
#COMMAND
Name revert~
Code do_revert
Position 104
Level 0
Log 0
End
all of these do_whatevers are declared in tables.c and mud.h in the proper places.
-----------------------------
here's where some more data is located for sunfish and roleplay, just so you can see what we were doing, in case this is somehow related to the problem.
in act_info.c's do_who....
invis_str[0] = '\0';
/* sprintf( buf, "%*s%-15s %s%s%s%s%s%s%s%s.%s%s%s\n\r", */
sprintf( buf, "%*s%-12s %-12s %s%s%s%s%s%s%s%s%s%s.%s%s%s\n\r",
(fGroup ? whogr->indent : 0), "",
rank,
class,
invis_str,
(wch->desc && wch->desc->connected) ? "[WRITING] " : "",
xIS_SET(wch->act, PLR_AFK) ? "[AFK] " : "",
xIS_SET(wch->act, PLR_ATTACKER) ? "(ATTACKER) " : "",
xIS_SET(wch->act, PLR_KILLER) ? "(KILLER) " : "",
xIS_SET(wch->act, PLR_THIEF) ? "(THIEF) " : "",
xIS_SET(wch->act, PLR_RP) ? "[RP] " : "",
(xIS_SET(wch->act, PLR_SUNFISH) && ch != wch) ? "(SUNFISH) " : "",
char_name,
wch->pcdata->title,
extra_title,
clan_name,
council_name );
and that's it. nothing fancy or amazing or ground breaking, so why is it breaking smaug?
|