This is a great way to do an inventory on your help system. I would also suggest adding a little code to do_help that logs what someone tried to get help on when they don't succeed in getting anything. 1) I am leaving the interpreter.c stuff up to you 2) Stick this into act.informative.c near do_help 3) just give me a little credit. * Warning: this uses George's buffer patch. if you don't have it use get rid * * of the lines with &'s * ACMD(do_index) { int i; int row=0; int minlen; & char *buf; if(!ch->desc) return; skip_spaces(&argument); if(!*argument) { send_to_char("USAGE: index <letter|phrase>\r\n",ch); return; } minlen=strlen(argument); & buf=get_buffer(8192); for(i=0;i<top_of_helpt;i++) { if(!strn_cmp(argument,help_table[i].keyword,minlen)) { row++; sprintf(buf+strlen(buf),"|%-23.23s |",help_table[i].keyword); if((row%3)==0) strcat(buf,"\r\n"); } } if(ch->desc) page_string(ch->desc,buf,1); & release_buffer(buf); } stick this into do_help: (yup, use the logf patch) if (bot > top) { send_to_char("There is no help on that word.\r\n", ch); ++ log("HELP: %s Could not find help on %s",GET_NAME(ch),argument); return; } --Angus +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST