Re: [Code] [Prob]

From: Desmond Daignault, Text DBA Contractor (tekdd@dtol.datatimes.com)
Date: 10/23/96


On Wed, 23 Oct 1996 mch@GLADSTONE.UOREGON.EDU wrote:

:Okie I am not sure this went out to the list:)
:anyway I am trying to code in a whois command which would display for
:like 'whois mch' Level 110 Dragon Ninja.  But alas I am having trouble
:it seems that when I do whois mch on the mud it also gives me the last
:buffer. Ie:
:"There are 2 visible immortals and there  are 2 visible mortals.
:There is a boot time high of 7 players.
:Level 110 Ninja"
:
:And here is the code:
:ACMD(do_whois)
:{
:  struct char_data *victim = 0;
:  struct char_file_u tmp_store;
:
:  skip_spaces(&argument);
:
:  if (!*argument) {
:      send_to_char("Do a WhoIS on which player?\r\n", ch);
:    } else {
:      CREATE(victim, struct char_data, 1);
:      clear_char(victim);
:      if (load_char(argument, &tmp_store) > -1) {
:        store_to_char(&tmp_store, victim);
:        sprintf(buf, "%s Level %d %s\r\n", buf, GET_LEVEL(victim),
                                           ^^^ Change to GET_NAME(victim)

:                class_abbrevs[(int) GET_CLASS(victim)]);
:        send_to_char(buf, ch);
:      } else {
:        send_to_char("There is no such player.\r\n", ch);
:      }
:      free(victim);
:    }
:}
:
:Hope ya peoples can solve this problem, would like to have race in there
:as well but not necessary.
:
:Andrew
:+-----------------------------------------------------------+
:| Ensure that you have read the CircleMUD Mailing List FAQ: |
:|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
:+-----------------------------------------------------------+
:
--

Dez.

-+= Nudd the Usurper =+-

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