Re: [NEWBIE] Bug in my do_advance

From: Chuck Reed (creed@I-55.COM)
Date: 12/18/97


[Snipped all the do_advance problems]

I had all sorts of problems when I changed to exp_to_level functions and 65
levels in my do_advance.  This is how I fixed it.  I took out all of the the
stuff after the
"You see demons inyour head"
"Blah blah blah"
and replaced it with this:

send_to_char(OK, ch);

  GET_LEVEL(victim) = newlevel - 1;
  GET_EXP(victim) = exp_to_level(victim) + 10;
  GET_LEVEL(victim) = oldlevel;
for(i=oldlevel;i < newlevel;i++) {
  advance_level(victim);
  }
GET_LEVEL(victim) = newlevel;
}

It may not be too pretty, but it works.

Chuck


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