help please do_site command

From: Beyond Exiled (exiled@NNI.COM)
Date: 11/30/97


Ok the general idea is to search through and print out all
instances of a particular site name.

Problem is it crashes :(
basically it seems (player_table + i) dosent equal what is supposed to
:(

ACMD(do_site)
{
struct player_host_element {
   char *name;
   char     *host;
   char     *unix_name;
   time_t   last_logon;
};
struct player_host_element *player_table;
long count = 0;
int i;

one_argument(argument, arg);
  if (!*arg)
  {
    send_to_char("For what site do you wish to search?\r\n", ch);
    return;
  }

send_to_char("Player:                   Time:           Site:\r\n", ch);
send_to_char("---------------------------------------------\r\n", ch);
for (i = 0;i <<= top_of_p_table; i++) {
if (!str_cmp((player_table + i)->host, arg)) {
  if (!((player_table + i)->unix_name)) {
    sprintf(buf, "%s%s                  %s                      %s\r\n", buf, (player_table + i)->name, ctime(&(player_table + i)->last_logon), (player_table + i)->host);
    count ++;
  } else if ((player_table + i)->unix_name) {
    sprintf(buf, "%s%s                  %s                      %s@%s\r\n", buf, (player_table + i)->name, ctime(&(player_table + i)->last_logon), (player_table + i)->unix_name, (player_table + i)->host);
    count ++;
   }
  }
 }
sprintf(buf2, "%ld Matches found.", count);
strcat(buf, buf2);
page_string(ch->desc, buf, 1);
}

     +------------------------------------------------------------+
     | 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/08/00 PST