[NEWBIE][CODE] Godset

From: Jimmie Tryon (zereth@EARTHLINK.NET)
Date: 11/28/02


I'm able to set the commands for wizards.  However, when
you type 'commands', this is what you get:

The following commands are available to you:

<BLANK>

There are no mortal commands showing.

<act.informative.c>

ACMD(do_commands)
{
  int no, i, cmd_num;
  int wizhelp = 0, socials = 0;
  struct char_data *vict;
  char arg[MAX_INPUT_LENGTH];

  one_argument(argument, arg);

  if (*arg) {
    if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD)) || IS_NPC
(vict)) {
      send_to_char(ch, "Who is that?\r\n");
      return;
    }
    if (GET_LEVEL(ch) < GET_LEVEL(vict)) { send_to_char(ch, "You can't see
the commands of people above your level.\r\n");
      return;
    }
  } else
    vict = ch;

  if (subcmd == SCMD_SOCIALS)
    socials = 1;
  else if (subcmd == SCMD_WIZHELP)
    wizhelp = 1;

  send_to_char(ch, "The following %s%s are available to %s:\r\n",
          wizhelp ? "privileged " : "",
          socials ? "socials" : "commands",
          vict == ch ? "you" : GET_NAME(vict)); /* cmd_num starts at 1,
not 0, to remove 'RESERVED' */
  for (no = 1, cmd_num = 1; cmd_info[cmd_sort_info[cmd_num]].command[0] !
= '\n'; cmd_num++) {
    i = cmd_sort_info[cmd_num];

    if (cmd_info[i].minimum_level < 0 || GET_LEVEL(vict) < cmd_info
[i].minimum_level)
      continue;


    if ((cmd_info[i].minimum_level >= LVL_IMMORT) != wizhelp)
      continue;

    if (!wizhelp && socials != (cmd_info[i].command_pointer == do_action
|| cmd_info[i].command_$
      continue;
if (!CMD_FLAGGED(vict, cmd_info[i].cmd_bits) && GET_LEVEL(vict) < LVL_IMPL)
        continue;

    send_to_char(ch, "%-11s%s", cmd_info[i].command, no++ % 7 ==
0 ? "\r\n" : "");
  }

  if (no % 7 != 1)
    send_to_char(ch, "\r\n");
}

Any idea what the problem is?

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT