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

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


Altho this is kinduva newbie C question, I'll answer it, because I think I
know what your problem is ('tho the code would have been nice).  What you
have is more of a logic error than anything, probably.
    In your function, check to make sure that you're doing GET_NAME(vict)
and not GET_NAME(ch), as (again, I'm assuming because I don't know what your
code looks like) GET_NAME(ch) would get the name of the implementor, and
kill them, whereas GET_NAME(vict) will get the person they typed in
(assuming the rest of your code is correct  :).

Hope that sends ya in the right direction,

Schlag

Mike Schlagenhauf
mschlag@cs.purdue.edu


-----Original Message-----
From: Brian <brian@IMI-BOTTLING.COM>
To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
Date: Tuesday, March 24, 1998 17:42
Subject:  [Newbie] Getting character's name for == conditional


>This is a dumb question, I'm sure...  I've been looking around the code,
>and trying to think of functions that might already be doing what I' trying
>to (so I don't bother the list), but I couldn't come up with anything..
>
>Here goes... in do_kill, I'm trying to set it, so if someone (of
>implementor level)types "kill testdummy", it performs  raw_kill on
>themself, instead of testdummy.  Now, the act() parts aren't a problem, and
>neither is raw_kill.  My problem is trying to figure out how to call
>GET_NAME() and compare it to see if it's "testdummy".  Either that or just
>compare vict (the argument after kill) with the word "testdummy".  If so,
>perform raw_kill on the killer.
>
>Anyone have an idea?
>
>If this is just a newbie 'C' question, I apologize in advance...
>
> - Brian
>
>
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>     +------------------------------------------------------------+
>


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



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