custom wizhelp problem

Posted by Bryn on Tue 07 Jan 2003 07:03 AM — 2 posts, 10,962 views.

#0
this is the modified code i currentlky use for my wizhelp:

void do_wizhelp( CHAR_DATA *ch, char *argument )
{
CMDTYPE * cmd;
int col, hash;
int curr_lvl;
col = 0;
set_pager_color( AT_WHITE, ch );

for ( curr_lvl = LEVEL_AVATAR; curr_lvl <= get_trust( ch );
curr_lvl++)
{
send_to_pager( "\n\r\n\r", ch);
col = 1;
pager_printf( ch, "[LEVEL %-2d] ", curr_lvl);
for (hash = 0; hash < 126; hash++ )
for ( cmd = command_hash[hash]; cmd; cmd = cmd->next )
if (( cmd->level == curr_lvl)
&& cmd->level <= get_trust( ch ) )
{
pager_printf( ch, "%-12s", cmd->name );
if ( ++col % 6 == 0 )
send_to_pager( "\n\r", ch );
}
}
if ( col % 6 != 0 )
send_to_pager( "\n\r", ch );
return;
}
normally, when this is used, when i access the wizhelp, it divides the wiz commands up by level and displays them.
The problem i recently found with this code is that when i increased the number of levels in my mud(to 115) and try to access the wizlist, it doesnt show the commands, it just shows the level numbers. Why might it be doing this?

Thanks once again,
Bryn
#1
Nevermind, Problem solved

Thanks for everything
Bryn