Re: [Code][Dumb]do_who

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 09/01/97

On Mon, 1 Sep 1997, J.T. wrote:

>I know this is probably really stupid, but I'm really tired and I can't
>seem to get it to work. I added the sorted do_who snippet and I keep
>getting this error:
>act.informative.c: In function `do_who':
>act.informative.c:1060: warning: `tch' might be used uninitialized in
>this function
Initialize tch to NULL and then try who to see if anything crashes (and was
thereby using the garbage pointer)

>[Immortal] Mordrek the Implementor instead of [55 Wa] blah blah...
>Any ideas of how I could do that?

const char *god_who[] = { "Immrt", " God ", "GrGod", "-Imp-" };

  sprintf(buf, "[ %s ] %s %s", god_who[GET_LEVEL(ch) - LVL_IMMORT],
        GET_NAME(ch), GET_TITLE(ch));
  [the usual]

George Greer  -   | Genius may have its limitations, but stupidity | is not thus handicapped. -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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