Re: new prompt questions

From: Tony Robbins (tonyr@pacific101.com)
Date: 02/28/99


*snip*
>that is defined here is the definition:
>extern struct title_type titles[NUM_CLASSES][LVL_IMPL + 1];
>
>any ideas?
*snip*
>> >  comm.o: In function `prompt_str':
>> > /circle30bpl14/src/comm.c:1059: undefined reference to `titles'
>> > /circle30bpl14/src/comm.c:1088: undefined reference to `titles'
*snip*
>> >      case 'X': // exp to level
>> >          sprintf(i, "%d",
titles[(int)GET_CLASS(ch)][GET_LEVEL(ch)+1].exp
>>                             ------
>>                             ^^^^^^^
>>                             try Defining
>>                                This

Here's my idea:  does that actually exist anywhere?  I believe it does in
stock bpl14, but that experience patch changes it, I think.  See if you can
even find it.  I don't think that that right there would do you any good
anyway.  Probably level_exp(...) - GET_EXP(ch) would put you closer to what
you're trying to do.  In my src:

    if (PRF_FLAGGED(d->character, PRF_DISPEXP) && (GET_LEVEL(d->character) <
LVL_IMMORT))
    sprintf(prompt, "%s\\c07XPtoLev: %d\\c00 ", prompt,
(level_exp(GET_CLASS(d->character), GET_LEVEL(d->character)+1) -
    GET_EXP(d->character)));

I'm not using dak's patch, as you can see, but that sprintf line might do
the trick for you, more or less.  Of course, you'll need to know what parts
to touch up.  :)

Remember, undefined reference means its not seeing what you referred to.
Since that happened to you at the linking process (not the compilation of
comm.c), that should be a clue that you don't have a 'titles[][]' anywhere.

-B.

AntiObCircle:
Is it that hard to cut the footer off a quote?  Or at least cut out the
irrelevant info?


     +------------------------------------------------------------+
     | 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 : 12/15/00 PST