Re: [Question] act.other.c - do_gen_tog

From: Nathan Davies (alamar@MARQUIS.NETINC.CA)
Date: 07/15/97


>   case SCMD_NOHASSLE:
>     if (PRF_TOG_CHK(ch, PRF_NOHASSLE) == 0) {
>       if (GET_PROMPT(ch))
>         free(GET_PROMPT(ch));
>         GET_PROMPT(ch) = "&G<Z:%z R:%r I:%i>&n";
>     } else {
>       if (GET_PROMPT(ch))
>         free(GET_PROMPT(ch));
>         GET_PROMPT(ch) = "Regular Player Prompt (testing):";
>     }
>     result = PRF_TOG_CHK(ch, PRF_NOHASSLE);
>     break;
>
> I have half of this working, when nohassle is turned ON, the prompt is
set
> to green and everything is groovy.. when nohassle is toggled again, it
> throws the game into a loop and I'm at a loss as to why (it's probably
> very simple!@#), any insight is appreciated.
>
> Eliah
> giblets.com 4000

Not sure if this is the direct answer to your problem, but whenever this is
called, the Nohass flag won't be toggled, or more accurately, it's toggled
twice.  Change the first toggle to IS_SET or appropriate define...

OR...  put the result = line first, and change the if(PRF.. = 0) to
if(result = 0)

Av fun, good luck an hey...enjoy life :)

Nathan Davies,
alamar@mail.netinc.ca


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



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