Re: [bpl11] Remorts again

From: Hans H. Hjort (hjort@S-96-226.RESNET.OHIO-STATE.EDU)
Date: 08/16/98


On Sun, 16 Aug 1998, Scorn wrote:

[...]

> and i used a int ok_to_remort that i saw on a multipatch on the ftp site.
> no what i want to do is have it so the person remorting must type in thier
> own name in order for it to work but everything i tried either crashes the
> game or doesnt work.  examples below
>
> if (GET_NAME(ch) != GET_NAME(vict)){
> send_to_char ("blah blah blah\r\n, ch);
> return;  *or return false if used in the int ok_remort*

        You haven't show us how the pointer vict is being found.  The
command interpreter gives you ch, but your command needs to find its own
vict.  It would help if you could supply the error messages and debugger
data.

> and many more just like these i have tried for hours to no avail,  the
> first example crashes the mud when remort <player> is typed and the second
> returns false even if the statement is true ie

This sounds suspiciously like what I would expect to happen if the pointer
vict wasn't initialized.  You need something like

vict=get_player_vis(ch, arg, 1);

or even a strcmp between GET_NAME(ch) and arg.

I hope this helps,

                                                -Hans


     +------------------------------------------------------------+
     | 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