Re: Aedit "features"...part 1

From: Chris Gilbert (chris@buzzbee.freeserve.co.uk)
Date: 04/29/00


Matthias Elsdragon wrote:
>
> I just hate when you add something new to your mud, and all of these new
> "features" pop up... ;)

I suggest you count/match your braces or get an editor that does
matching for you.

/-if (!isdigit(*buf1))     {
| /-if (strn_cmp("save", buf1, 4) == 0)         {
| | /-if (!*buf2)             {
| | | /-if (GET_OLC_ZONE(ch))                 {
| | | |   save = 1;
| | | |   number = (GET_OLC_ZONE(ch) * 100);
| | | +=} else                 {
| | | |   /* -mm 42500 */
| | | | /-if (subcmd != SCMD_OASIS_AEDIT) {
| | | | |   if ((number = (*buf2 ? atoi(buf2) :
| | | | | /-        (GET_OLC_ZONE(ch) ? GET_OLC_ZONE(ch) : -1)) * 100) <
0 )  {
| | | | | |   send_to_char("Save which zone?\r\n", ch);
| | | | | |   return;
| | | | | \-}
| | | | +=} else {
| | | | |   save = 1;
| | | | |   number = atoi(buf2) * 100;
| | | | \-}
| | | \-}
| | +=}
| | | else if (subcmd == SCMD_OASIS_AEDIT)
| | |   number = 0;
| | | else if (subcmd == SCMD_OLC_ZEDIT && GET_LEVEL(ch) >=
| | +=    LVL_IMPL)    {
| | | /-if ((strn_cmp("new", buf1, 3) == 0) && *buf2)
| | | |   zedit_new_zone(ch, atoi(buf2));
| | | +-else
| | | \-  send_to_char("Specify a new zone number.\r\n", ch);
| | |   return;
| | +=} else    {
| | |   send_to_char("Yikes!  Stop that, someone will get hurt!\r\n",
ch);
| | |   return;
| | \-}
| \-}


etc

I think that the else if (subcmd == SCMD_OASIS_AEDIT) should match the
level of the if strn_cmp save.

(note that your save code looks wrong, but mine may look different cos
of all the editors/oasis 2 etc...

Cheers,
Chris


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