Re: Names?

From: Chris Maniar (rafo@kulthea.stacken.kth.se)
Date: 05/03/00


On Wed, 3 May 2000, Shawn Kimbley wrote:

> Thanks for the ideas, although I still haven't gotten this to work yet.
> This is what i've currently got:
>
> ACMD(do_wizme)
> {
> struct char_file_u *d;
>     if (str_cmp((d->character->name), "Bob") {

strcmp() returns NULL if the strings match.

So, use: if (!strcmp(GET_NAME(ch), "Bob")) { blah }
     or: if (strcmp(GET_NAME(ch), "Bob") == NULL) { blah }

If you're a unix type system (linux, solaris, bsd, etc), try "man
strcmp". Man pages rock :P


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT