[Newbie][Semi-Long]Advance Bug HELP!

From: Kevin Dethlefs (demortes@msn.com)
Date: 09/29/02


Alright, I'm a bit confused. As a newbie to MUD programming, and C overall,
I can't find a thing wrong with the advance command. I looked in the
archives, and found that this is a unique situation. I still did what some
of the others said back then, but everything checks out. Here goes:

When I try to advance someone to level 101 (this is a 110 level system) it
puts them at level 110, imp. When I try to advance to 102, it doesn't do
anything. Same as 103, 104, 105, 106 (youllhave to excuse me, I'm testing
all the immortal levels right now), 107, 108, 109, and 110. I dont get what
is going on. Code doesn't look wrong. Exp tables are set I believe. I dont
know what else there is. I'll put the code for advance down below:

struct char_data *victim;
char *name = arg, *level = buf2;
int newlevel, oldlevel;

two_arguments(argument, name, level);

if (*name) {
   if (!(victim = get_char_vis(ch, name, NULL, FIND_CHAR_WORLD))) {
     send_to_char("That player is not here.\r\n", ch);
} else {
   send_to_char("Advance who?\r\n", ch);

if (GET_LEVEL(ch) <= GET_LEVEL(victim)) {
   send_to_char("Maybe that's not such a great idea.\r\n", ch);
if (IS_NPC(victim)) {
   send_to_char("NO!  Not on NPC's.\r\n", ch);
if (!*level || (newlevel = atoi(level)) <= 0) {
   send_to_char("That's not a level!\r\n", ch);
if (newlevel > LVL_IMPL) {
   sprintf(buf, "%d is the highest possible level.\r\n", LVL_IMPL);
   send_to_char(buf, ch);
if (newlevel > GET_LEVEL(ch)) {
   send_to_char("Yeah, right.\r\n", ch);
if (newlevel == GET_LEVEL(victim)) {
   send_to_char("They are already at that level.\r\n", ch);
oldlevel = GET_LEVEL(victim);
if (newlevel < GET_LEVEL(victim)) {
   GET_LEVEL(victim) = newlevel;
   send_to_char("&KYou are momentarily enveloped by darkness!&n\r\n"
"&KYou feel somewhat diminished.&n\r\n", victim);
} else {
   act("&K$n makes some strange gestures.\r\n"
"A strange feeling comes upon you,\r\n"
"Like a giant hand, light comes down\r\n"
"from above, grabbing your body, that\r\n"
"begins to pulse with &Mc&Bo&Cl&Ro&Mr&Be&Cd&n &Klights\r\n"
"from inside.\r\n\r\n"
"Your head seems to be filled with &rdemons&n\r\n"
"&Kfrom another plane as your body dissolves\r\n"
"to the elements of time and space itself.\r\n"
"Suddenly a silent explosion of light\r\n"
"snaps you back to reality.\r\n\r\n"
"You feel slightly different.", FALSE, ch, 0, victim, TO_VICT);

send_to_char(OK, ch);

if (newlevel < oldlevel)
   log("(GC) %s demoted %s from level %d to %d.",
GET_NAME(ch), GET_NAME(victim), oldlevel, newlevel);
   log("(GC) %s has advanced %s to level %d (from %d)",
GET_NAME(ch), GET_NAME(victim), newlevel, oldlevel);

level_exp(GET_CLASS(victim), newlevel) - GET_EXP(victim));
save_char(victim, NOWHERE);

These are my stats for the system:
Redhat linux
Circle BPL 17
Ascii Pfile
Modified looks

Please help me out, I been having this bug for a time now. I removed the
advance command first off, and found it annoying without it.
Thanks in advance (no pun intended). (Please dont laugh at my dull sense of
humor :P)

Kevin Dethlefs
AIM: Demortes YAHOO: Kdeathwish MSN: Above email WEBSITE:
GET MY PGP KEY AT: http://www.geocities.com/kdeathwish/pubpgp.txt
Dnal lives! If you were on the staff originally, email me your mud name,
position, and I'll get back to you. Demortes@msn.com
While you’ve been reading the above, thousands of people all over the world
have been working to put money in my pocket. I even make money while I
sleep! By this time next week, so could YOU. Get full info here:

MSN Photos is the easiest way to share and print your photos:

   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |

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