Re: Remort Issue

From: Patrick Dughi (
Date: 09/06/00

> Well it would seem that remorts just arent saving, or going to unused,
> because when a person first logs on, they are fine and all their remorts
> are set to 0, its when they log off and come back on i have the problem

        Well, do the remort variables exist within the part of the player
file that is saved to disk?  Do you have ascii pfiles and they have to be
saved manually?  Do you perform some operation on the varaibles pre/post
load/save?  Perhaps you changed the pfile structure and never did a pfile
wipe and characters are overlapping?

        You've managed to find at least one component.  It's repeatable.
You shouldn't have any trouble now, locating (and fixing) the source.  You
already know it has to do with save & load.  So, look at it.

> for some reason the problem is also causing us to see this in practice
> You know of the following skills:
> !UNUSED!              (superb)
> !UNUSED!              (superb)
> for about 7 pages,

        Okay, first, if your list_skills() proc is stock (which I doubt,
if you're depending on remort classes) then you shouldn't see the unused
spells unless your MAX_SPELLS/MAX_SKILLS are set up much higher than they
actually are, and you've changed the skill initilization code so that new
skills don't automatically have their minlevel set high enough that
characters will not see the unused skills. Both of which are fairly
possible. Of course, any changes to those two variables
(MAX_[SPELLS|SKILLS]) requires a bit of playerfile conversion/wiping.
Maybe you just want to keep it high (for expansion purposes) and add a
line that will check to see if the spell/skill name is '!UNUSED!' and if
so, don't use it, and fix your spell-minlevel initilization anyway.
Unless you've been testing with your immort-level characters, which is
silly, since the min_level on spells is default to LVL_IMMORT, so they'll
always see em.

        To continue, your problem is probably class based, since that's
what list_skills operates on.  If you've replaced/altered/modified the
effect of your current class with something else (like a remort class),
and those are always set to -1 or 0 or off, or whatever... then you may be
attempting to access a skill/spell in the spell_info[] table where the
minlevel[# of classes] array will always return the fact that the spell is
out of bounds.  If, for example, all your classes are monk, and you
haven't added any skills for monk yet, and you display the unused skills,
you will obviously see them all, without any actual skills.  Because this
is all array based, you should tank your lucky stars that it doesn't just
crash here.  Probably because you've got 7 extra pages of 'unused' spells,
if you run past the end of one of the array bounds in the array of
spell/skill info, you'll just get some portion of the next entry.  That
means you'll get something that's potentially valid.  Still, you're

In an unrelated topic

        I don't know how to say this, exactly, but it doesn't look like
you have the ability yet to solve this problem on your own.  The problem
isn't directly from the patch/snippet, or the stock code, but rather that
you don't yet understand any help given, enough to be able to comprehend
it. The whole thing is a large enough issue, with many interdependancies,
that no one can solve it via your description - they'd have to get your
complete source code.  I don't think many people here would volunteer to
do write your mud for you though, as most have their own.

        For the time being, I recommend that you remove the parts of the
remort code that you've put in, and focus on learning how to alter the
parts of the code you already have before adding something of this
complexity. Focus on learning how to program in C, and then, in a while,
you'll be able to install broken patches and learn how to fix them.
You'll also gain the insight as to which pieces of information are
important when describing them to this mailing list, so that people can be
more effective in helping you.

     In short, if you can't program, you shouldn't yet be programming.
                        Learn to program first.


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/11/01 PDT