ASCII player files v2.0b

From: Ryan Guthrie (guthrie@henge.com)
Date: 02/11/99


I initially installed this into a stock version of circle(bpl14) and
patched in everything, gettit it to work except for one think.  I then
installed it into my code, with the plan of fixing the problem later.  The
problem is with last, set file, and stat file.  All which have to go
through load_char to get the information on the character.  Well, when it
is called, some how victim(in the case of stat) or ch, always seem to be
null.  If this wasn't trying to get the name from the file, i would so a
simple get_player_vis, but not sure with the file.

    ...
    if (!*buf2) {
      send_to_char("Stats on which player?\r\n", ch);
    } else {
      CREATE(victim, struct char_data, 1);
      clear_char(victim);
      if (load_char(buf2, victim) > -1) {
        char_to_room(victim, 0);
        ...
This snipped of code is from do_stat in set file section.  Before the
CREATE macro, victim is null, after that, victim is "" (aka no string,
but not NULL) if i remember right(at least that is what the log function
returns before it crashes).  it crashes in the load_char function on the
line:      ch->affected = NULL;
...just because ch is not defined...which isn't defined because victim
going into load_char is nothing.  That is problem number 1...any ideas?


Problem two consists of a slightly different problem, which i think might
have to do with player_table.  When you create a new character, it saves
everything correctly to the player files(lib/pfiles/<letter>/<name>.plr
and plr_index) but fails to read the index correctly next time it searches
to see if the player has already been created or not.  I had this problem
earlier, fixed it, went to bed, next night, was broken again.  Since i
stayed up so late that night, i don't exactly remember how i fixed it.
Help would also be appricated on this.

--Thanks


                        -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
                        |       Ryan Guthrie(Sim)       |
                        |       guthrie@henge.com       |
                        -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-


     +------------------------------------------------------------+
     | 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