[code] showing all players in pfile

From: Peter d (death_comes_to_all@hotmail.com)
Date: 08/13/02


Hi!
i used this snippet, don't remember who wrote it..
it only shows one player.. i want it to show all stored in pfile..

ACMD(do_players)
{
  char buf[MAX_INPUT_LENGTH];
  int i, count = 0;
  *buf = 0;

  for (i = 0; i < top_of_p_table; i++) {
    sprintf(buf, "%s  %-20.20s", buf, (player_table + i)->name);
    count++;
    if (count == 3) {
      count = 0;
      strcat(buf, "\r\n");
    }
  }
  page_string(ch->desc, buf, 1);
}

i am using bpl21..

_________________________________________________________________
Skicka snabbmeddelanden till dina všnner online med MSN Messenger:
http://messenger.msn.se

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT