Re: [CODE] Can't figure out my bug

From: Sammy (samedi@DHC.NET)
Date: 05/04/98


On Sun, 3 May 1998, Rick Glover wrote:

> I've been having a problem with a certain part of my code and I'm hoping
> that someone could help me out.  I'm trying to simply access do_help in
> interpreter.c to show help on a class that the user selects.  This is in
> the character generation process of nanny.

>       do_help(d->character, *pc_race_types[(int)load_result], 0, 0);

You declared pc_race_types to be an array of pointers to strings, so
*pc_race_types[anything] is the memory address of the race string.  What
you want here is:

      do_help(d->character, pc_race_types[(int)load_result], 0, 0);

That will clear up your error.

Sam


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



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