Re: [Circle] race docs

From: John C. A. Bambenek, Esq. (bambenek@alecto.physics.uiuc.edu)
Date: 07/29/96


By any chance, does the "ch" reference refer to code that might be in 
another file, because when I remove QRACE, it works fine.

On Mon, 29 Jul 1996, John C. Dodds wrote:

> John C. A. Bambenek, Esq. wrote:
> > 
> > I am getting this compiling error when I try to work with this race document
> > 
> > gcc -c -g -O -i486-linux -m486 -Wall -fno-strict-prototypes  interpreter.c
> > interpreter.c: In function `nanny':
> > interpreter.c:1556: `ch' undeclared (first use this function)
> > interpreter.c:1556: (Each undeclared identifier is reported only once
> > interpreter.c:1556: for each function it appears in.)
> > make[1]: *** [interpreter.o] Error 1
> > 
> > Here is the area in the code.
> > <CODE SNIPPED>
> > 
> >     SEND_TO_Q(race_menu, d);
> >     SEND_TO_Q("\r\nRace: ", d);
> >     STATE(d) = CON_QRACE;
> >     break;
> > 
> >   case CON_QRACE:
> >     load_result = parse_race(*arg);
> >     if (load_result == RACE_UNDEFINED) {
> >       SEND_TO_Q("\r\nThat's not a race.\r\nRace: ", d);
> >       return;
> >     } else
> >       GET_RACE(d->character) = load_result; /* Error here */
>         break;
>         ^^^^^^Try this it might work.
> >     if (GET_PFILEPOS(d->character) < 0)
> >       GET_PFILEPOS(d->character) = create_entry(GET_NAME(d->character));
> >     init_char(d->character);
> >     save_char(d->character, NOWHERE);
> >     SEND_TO_Q(motd, d);
> >     SEND_TO_Q("\r\n\n*** PRESS RETURN: ", d);
> >     STATE(d) = CON_RMOTD;
> > 
> > <CODE SNIPPED>
> > 
> > Any ideas???
> > 
> >
> Hmm I don't see an error with what you have done except you don't have a
> break statement where i noted if that doesn't work take a look at what i
> have attached to this it might help, it works great for me.
> 
> John
> 
>       SEND_TO_Q("That is not a sex..\r\n"
> 		"What IS your sex? ", d);
>       return;
>       break;
>     }
> 
> 	load_result = 0;
>     SEND_TO_Q(race_menu, d);
>     SEND_TO_Q("\r\nRace: ", d);
>     STATE(d) = CON_QRACE;
>     break;
> 
>   case CON_QRACE:
> 	  race_result = 0;
> 	  race_result = parse_race(*arg);
> 	  if (race_result == RACE_UNDEFINED) {
> 		  SEND_TO_Q("\r\nThat's not a race.\r\nRace: ",d);
> 		  race_result = 0;
> 		  return;
> 	  }
> 
> 	  else
> 	  {
> 		  GET_RACE(d->character) = race_result;
> 	  }
> 	  
> 	  if (race_result == RACE_HUMAN)
> 		  {
> 			  SEND_TO_Q(human_class_menu, d);
> 			  SEND_TO_Q("\r\nClass: ", d);
> 			  STATE(d) = CON_QCLASS;
> 		  }
> 	  if (race_result == RACE_ELF)
> 		  {
> 			  SEND_TO_Q(elf_class_menu, d);
> 			  SEND_TO_Q("\r\nClass: ", d);
> 			  STATE(d) = CON_QCLASS;
> 		  }
> 	  if (race_result == RACE_GNOME)
> 		  {
> 			  SEND_TO_Q(gnome_class_menu, d);
> 			  SEND_TO_Q("\r\nClass: ", d);
> 			  STATE(d) = CON_QCLASS;
> 		  }
> 	  if (race_result == RACE_DWARF)
> 		  {
> 			  SEND_TO_Q(dwarf_class_menu, d);
> 			  SEND_TO_Q("\r\nClass: ", d);
> 			  STATE(d) = CON_QCLASS;
> 		  }
> 	  if (race_result == RACE_HALF_ORC)
> 		  {
> 			  SEND_TO_Q(half_orc_class_menu, d);
> 			  SEND_TO_Q("\r\nClass: ", d);
> 			  STATE(d) = CON_QCLASS;
> 		  }
> 	  if (race_result == RACE_HALF_ELF)
> 		  {
> 			  SEND_TO_Q(half_elf_class_menu, d);
> 			  SEND_TO_Q("\r\nClass: ", d);
> 			  STATE(d) = CON_QCLASS;
> 		  }
> 	  if (race_result == RACE_HALFLING)
> 		  {
> 			  SEND_TO_Q(halfling_class_menu, d);
> 			  SEND_TO_Q("\r\nClass: ", d);
> 			  STATE(d) = CON_QCLASS;
> 		  }
> 	  break;
> 
> 
>   case CON_QCLASS:
> 	  if (race_result == RACE_HUMAN)
> 	  {
> 		  class_result = 0;
> 		  class_result = parse_human(*arg);
> 		   if (class_result == CLASS_UNDEFINED)
> 		  {
> 			  SEND_TO_Q("\r\nThat's not a valid class for your race.\r\nClass: ",
> d);
> 			  class_result = 0;
> 			  return;
> 		  }
> 		   else
> 			   GET_CLASS(d->character) = class_result;
> 	  }
> 	  if (race_result == RACE_ELF)
> 	  {
> 		  class_result = 0;
> 		  class_result = parse_elf(*arg);
> 		  if (class_result == CLASS_UNDEFINED)
> 		  {
> 			  SEND_TO_Q("\r\nThat's not a valid class for your race.\r\nClass: ",
> d);
> 			  class_result = 0;
> 			  return;
> 		  }
> 		  else
> 			  GET_CLASS(d->character) = class_result;
> 	  }
> 	  if (race_result == RACE_GNOME)
> 	  {
> 		  class_result = 0;
> 		  class_result = parse_gnome(*arg);
> 		  if (class_result == CLASS_UNDEFINED)
> 		  {
> 			  SEND_TO_Q("\r\nThat's not a valid class for your race.\r\nClass: ",
> d);
> 			  class_result = 0;
> 			  return;
> 		  }
> 		  else
> 			  GET_CLASS(d->character) = class_result;
> 	  }
> 	  if (race_result == RACE_DWARF)
> 	  {
> 		  class_result = 0;
> 		  class_result = parse_dwarf(*arg);
> 		  if (class_result == CLASS_UNDEFINED)
> 		  {
> 			  SEND_TO_Q("\r\nThat's not a valid class for your race.\r\nClass: ",
> d);
> 			  class_result = 0;
> 			  return;
> 		  }
> 		  else
> 			  GET_CLASS(d->character) = class_result;
> 	  }
> 	  if (race_result == RACE_HALF_ORC)
> 	  {
> 		  class_result = 0;
> 		  class_result = parse_half_orc(*arg);
> 		  if (class_result == CLASS_UNDEFINED)
> 		  {
> 			  SEND_TO_Q("\r\nThat's not a valid class for your race.\r\nClass: ",
> d);
> 			  class_result = 0;
> 			  return;
> 		  }
> 		  else
> 			  GET_CLASS(d->character) = class_result;
> 	  }
> 	  if (race_result == RACE_HALF_ELF)
> 	  {
> 		  class_result = 0;
> 		  class_result = parse_half_elf(*arg);
> 		  if (class_result == CLASS_UNDEFINED)
> 		  {
> 			  SEND_TO_Q("\r\nThat's not a valid class for your race.\r\nClass: ",
> d);
> 			  class_result = 0;
> 			  return;
> 		  }
> 		  else
> 			  GET_CLASS(d->character) = class_result;
> 	  }
> 	  if (race_result == RACE_HALFLING)
> 	  {
> 		  class_result = 0;
> 		  class_result = parse_halfling(*arg);
> 		  if (class_result == CLASS_UNDEFINED)
> 		  {
> 			  SEND_TO_Q("\r\nThat's not a valid class for your race.\r\nClass: ",
> d);
> 			  class_result = 0;
> 			  return;
> 		  }
> 		  else
> 			  GET_CLASS(d->character) = class_result;
> 	  }
> 
>     if (GET_PFILEPOS(d->character) < 0)
>       GET_PFILEPOS(d->character) = create_entry(GET_NAME(d->character));
>     init_char(d->character);
>     save_char(d->character, NOWHERE);
>     SEND_TO_Q(motd, d);
>     SEND_TO_Q("\r\n\n*** PRESS RETURN: ", d);
>     STATE(d) = CON_RMOTD;
> 

__________________________________________________________________________
|from: John C. A. Bambenek  &         | Runaway MUD Development Team Head |
|      Christina M. Drummond          | Test Site At :                    |
|bambenek@alecto.physics.uiuc.edu     | dragonlance.cei.net 9000          |
|http://www.physics.uiuc.edu/~bambenek| Based on the AmalgaMUD concept    |
|_____________________________________|___________________________________|


+-----------------------------------------------------------+
| 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/07/00 PST