Redoing Advance...

From: Ramsey Stone (
Date: 11/09/01

Hi Again ^ ^,

   Ive been redoing my advance command. Thanks for all your
help on the who MOTD! Sorry to bug you again. Anyways, brace
yourself, its gonna be a long one. And id appreciate it if you
didnt comment on my skills in c, its not very nice :)

Ok, Ive been converting CircleMUD into a leveless. Soooo....
I remade the advance command so It dosnt use numbers, it
uses names. Only problem is, I get TONS of errors. Ive
been a bad boy :(. Anyway, heres my remade advance command:
* Command: advance                              Author: Andra *
*                                                             *
* USAGE: advance <person> <position>                          *
*                                                             *
* This command was rewritten because of the usage of levels.  *
* it has now been revamped so it WORKS and it has NOTHING to  *
* do with levels.                                             *

ACMD(do_advance) {
  struct char_data *victim;
  char *name = NULL, position[MAX_STRING_LENGTH] = NULL,

  two_arguments(argument, name, position);

  /* -- Beginning of Checks -- */

  if (*name) {
      if (!(victim = get_char_vis(ch, name, NULL, FIND_CHAR_WORLD))) {
          send_to_char("You cant seem to find them.\r\n", ch);
  } else {
          send_to_char("Advance Who?\r\n", ch);

  if (GET_LEVEL(ch) <= GET_LEVEL(victim)) {
    send_to_char("Maybe that's not such a great idea.\r\n", ch);

  if (!*position) {
    send_to_char("Advance them to WHAT!?\r\n", ch);

  /* -- End of Checks -- */

  switch (position) {
    case 'immortal':
    case 'Immortal':
         GET_LEVEL(victim) = LVL_IMMORT;
    case 'novice':
    case 'Novice':
         GET_LEVEL(victim) = LVL_JRBUILD;
    case 'builder':
    case 'Builder':
         GET_LEVEL(victim) = LVL_GOD;
    case 'advanced':
    case 'Advanced':
         GET_LEVEL(victim) = LVL_ADVBUILD;
    case 'editor':
    case 'Editor':
         GET_LEVEL(victim) = LVL_EDITOR;
    case 'assistant':
    case 'Assistant':
         GET_LEVEL(victim) = LVL_ASSIST;
    case 'supervisor':
    case 'Supervisor':
         GET_LEVEL(victim) = LVL_IMMORT;
    case 'ruler':
    case 'Ruler':
         GET_LEVEL(victim) = LVL_JRBUILD;
         send_to_char("Thats NOT a position!!!\r\n", ch);

sprintf(buf, "Your head floods with thoughts
of power and glory, and white
doves take flight into the pure
blue sky. The ringing of bells
can be heard in the distance,
making you rejoice. Your body
is taken to another dimension,
then snapped back to reality
with a sudden ring in your ears.

You have become a %s!", position);
sprintf(logger, "(GC) %s advanced %s to %s", GET_NAME(ch), GET_NAME(victim),
send_to_char(buf, victim);
mudlog(logger, NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE);

Sorry if its over 75 chars long. Anyways, I compile, and it
gives me the following errors:
make ../bin/circle
make[1]: Entering directory `/usr/users/mud/apocmud/EG/src'
gcc -g -O2 -Wall    -c -o act.wizard.o act.wizard.c
act.wizard.c: In function `do_advance':
act.wizard.c:1435: invalid initializer
act.wizard.c:1463: switch quantity not an integer
act.wizard.c:1464: character constant too long
act.wizard.c:1465: character constant too long
act.wizard.c:1468: character constant too long
act.wizard.c:1469: character constant too long
act.wizard.c:1472: character constant too long
act.wizard.c:1473: character constant too long
act.wizard.c:1476: character constant too long
act.wizard.c:1477: character constant too long
act.wizard.c:1480: character constant too long
act.wizard.c:1481: character constant too long
act.wizard.c:1484: character constant too long
act.wizard.c:1485: character constant too long
act.wizard.c:1488: character constant too long
act.wizard.c:1489: character constant too long
act.wizard.c:1492: character constant too long
act.wizard.c:1493: character constant too long
act.wizard.c:1466: warning: unreachable code at beginning of switch
act.wizard.c:1503: parse error before `void'
act.wizard.c:1511: `vict' undeclared (first use in this function)
act.wizard.c:1511: (Each undeclared identifier is reported only once
act.wizard.c:1511: for each function it appears in.)
act.wizard.c:1519: `i' undeclared (first use in this function)
act.wizard.c:1435: warning: unused variable `logger'
make[1]: *** [act.wizard.o] Error 1
make[1]: Leaving directory `/usr/users/mud/apocmud/EG/src'
make: *** [all] Error 2

Does anyone see anythihng wrong with my code? If you
do, could you kindly point it out?

             Thanks in Advance,
                       Ramsey Stone(Andra)

Get your FREE download of MSN Explorer at

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/06/01 PST