>My set file player <whatever> <value> isn't working, but I don't see
>why...
in do_set() :
CREATE(cbuf, struct char_data, 1);
clear_char(cbuf);
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)....
return;
part
to
if (IS_NPC(ch) || GET_PFILEPOS(ch) < 0 || !ch->desc)
return;
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
fclose(fl);
right before
return(id);
in load_char()
because if you didn't, you'll have problems.
>Thanks,
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: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST