Re: [Sorta-long]HELP Advance command

From: Brian (
Date: 10/27/02

Kevin Dethlefs wrote:
> class.c up at

Checking class.c, it appears your problem is that you haven't fully
defined your tables.  In level_exp(), all of your values only go up to
LVL_IMMORT (101).  All levels past that (102-110) have no experience
listed for them.  As such, it falls through to the default statement at
the bottom:

  log("SYSERR: XP tables not set up correctly in class.c!");
  return 123456;

If you check your syslog, you'll probably see a bunch of those SYSERRs.
The result is that this statement in do_advance() [which you posted in
an earlier message]:

  gain_exp_regardless(victim, level_exp(GET_CLASS(victim), newlevel) -

gets translated to:

  gain_exp_regardless(victim, 123456 - GET_EXP(victim));

And since a level 101 has an experience >> 123456, he winds up gaining
negative experience and dropping to level 32, as you stated.

And, if that is still the most up to date advance command, any attempts
to advance above level 101 will result in a demotion/promotion to
somewhere in the mortal realm, depending on the level of the character
who's being worked upon.

Your first step should be to add additional case statements for each
class so that levels 102-110 work.  While you're at it, you might check
your saving throw tables -- those are also "broken" because they only go
through level 40.

Overall, the easiest solution is to generate the experience, saving
throw, and thac0 information using a formula rather than using hundreds
of repetitive return lines.


   | FAQ: |
   | Archives: |
   | Newbie List:   |

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