Ascii Pfile Fix (was Re: Weather & Zones?)>

From: Akuma/Chris Baggett/DOOMer (doomer@BAYOU.COM)
Date: 10/22/97

>My set file player <whatever> <value> isn't working, but I don't see
in do_set() :
    CREATE(cbuf, struct char_data, 1);
    if ((player_i = load_char(name, &tmp_store)) > -1) {
      store_to_char(&tmp_store, cbuf);
      GET_PFILEPOS(cbuf) = player_i;      // NEEDED if saving to file <--
add this line

and in save_char() in db.c (not sure what the original line was)
change the if (IS_NPC(ch)....
if (IS_NPC(ch) || GET_PFILEPOS(ch) < 0 || !ch->desc)
this SHOULD kick out if GET_PFILEPOS(ch) > 0  (ie you set the
pfilepos(cbuf) -> player_i in load_char() and are trying to save
em now.
if it STILL doesn't save to disk after this change,
remove the  '|| !ch->desc'  part in save_char().
b/c it works fine with me now :-) it was a hard bug to track down.

btw, i hope you guys remembered a
right before
in load_char()
because if you didn't, you'll have problems.

You're welcome :-P

Code On
Akuma the Raging Coder

  | "The poets talk about love, but what I talk about is DOOM, |
  |      because in the end, DOOM is all that counts." -       |
  |   Alex Machine/George Stark/Stephen King, The Dark Half    |
  |        "Nothing is IMPOSSIBLE, Just IMPROBABLE"            |
  |   "Easier Said Than Done, But Better Done Than Said..."    |

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

This archive was generated by hypermail 2b30 : 12/08/00 PST