[Circle] ACMD(do_players)

From: Klaus Greve Fiorentini (kgreve@dcc.unicamp.br)
Date: 08/02/96


  I've followed the instructions below but when i try to use the "players"
command my mud simply crascres :(

>
>This piece of code will list out all the players in the player file. Have
>fun!
>
>act.informative.c
>
>extern struct player_index_element *player_table;
>extern int top_of_p_table;
>
>ACMD(do_players)
>{
>  int i, count = 0;
>
>  for (i = 0; i <= top_of_p_table + 1; i++) {
>    sprintf(buf, "%s  %-20.20s", buf, (player_table + i)->name);
>    count++;
>    if (count == 3) {
>      count = 0;
>      send_to_char(buf, ch);
>      send_to_char("\r\n", ch);
>      sprintf(buf, "");
>    }
>  }
>}
>
>interpreter.c
>
>ACMD(do_players);
>
>{ "players"  , POS_DEAD    , do_players  , 0, 0 },
>
>Let me know if there are any problems with this!
>
>Justin - Primacy <jmrobins@wired.uvm.edu>

Any ideia?

Thanks in advance

Klaus.

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/07/00 PST