Re: [Newbie] Getting character's name for == conditional

From: Mike Schlagenhauf (mschlag@CS.PURDUE.EDU)
Date: 03/24/98

On Tue, 24 Mar 1998, Brian wrote:

>       send_to_char("Your mother would be so sad.. :(\r\n", ch);
>     else if (((strcmp(argument, "testdummy")) && (GET_LEVEL(ch) ==
                ^^^  <--- this is your problem (one of)
        strcmp() returns 0 on a successful match, so that's going to
evaluate to false each time.

> LVL_IMPL) && (strcmp(GET_NAME(vict), "testdummy")))) {
>     raw_kill(ch);
              ^^^^  <--- this is your other problem
        Like I'd said in my first post, you're killing off the person that
typed the command, change that to raw_kill(vict);

Mike Schlagenhauf
"If a man speaks in the forest, and there's no woman around to hear him,
is he still wrong?"  --  Unknown
"A friend is a person who sticks with you through all the trouble they've
caused you..." -- Marylin vos Savant

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

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