Hmmm, one way you could probably get around this would be to declare a new CON_GET state, for say, CON_GET_FINGER, and that way, since you use load_char_obj, I believe you have to pass it a descriptor to load the character to, and you could set the d->connected = CON_GET_FINGER... then you could check in the code that verifies that player's followers if d->connected == CON_GET_FINGER, don't unload_char... something along those lines may work for you...
Richard Lindsey -----Original Message----- From: Valnir [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 15, 2004 4:13 PM To: [email protected] Subject: Re: Characters loosing EQ. Sorry Richard, no confusion meant.. I was only using the "!" to express that it didn't return a char, but a NULL. Like I said.. example functions. As for why things would be checked.. We have a noble system in place. When a character is loaded, it checks that characters followers to make sure they all still exist (offline deletion, etc) to make sure the character isn't credited with followers that no longer exist. Well, the problem exists where, if for some reason a character is retrieved via "get_char_offline" and then for some other reason retrieved again (if already loaded, "get_char_online"), and then unloaded ("unload_char") by the second get. As you all know, when a character is unloaded, all their EQ is stripped, so what ends up happening, is the character is stripped and unloaded, but still resident in memory in another location, but now naked... so when the character is unloaded the second time a naked character is saved, effectively deleting all the characters EQ. Is that clearer??? Damn I hope so... again, sorry for any confusion. - Valnir ----- Original Message ----- From: "Richard Lindsey" <[EMAIL PROTECTED]> To: "Valnir" <[EMAIL PROTECTED]>; <[email protected]> Sent: Wednesday, December 15, 2004 4:36 PM Subject: RE: Characters loosing EQ. It may help if you told us why you were checking followers for the finger function, and in what cases get_char_offline returns a false value, since you check for that at the beginning of check_followers, I'm assuming it checks to see if the char is logged in and if so, returns false... and what your unload_char function actually does, because if it's dumping the eq list then it sounds like something's just not written write in it... and just out of curiosity, why are you using that unload_char function instead of something like save_char_obj/extract_char? And since you're only loading the player for a finger command, the save_char_obj wouldn't even be necessary, you could just load the character, format the output and send to the fingerer, and extract the character... Richard Lindsey -----Original Message----- From: Valnir [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 15, 2004 2:50 PM To: [email protected] Subject: Characters loosing EQ. Here is a good question for you guys. We have a problem where when a character is loaded via "get_char_offline" and then another function ALSO gets the same char online/offline and does "unload_char", it dumps all the eq, then re-saves and unloads the char at the end of the prior function. Example. void do_finger ( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; victim = get_char_offline( argument ); check_followers( victim ); // OUTPUT HERE unload_char( victim ); return; } void check_followers( CHAR_DATA *ch ) { if ( !get_char_offline( follower ) ) blah blah blah. unload_char( follower ); return; } In "get_char_offline" the system uses "load_char_obj" and in "load_char_obj" it checks for a valid liege...... by "get_char_offline" and then "unload_char". So we are unloading the char, before we're really done with it.. did I lose you? I am sure SOMEONE has run across this issue. - Valnir -- ROM mailing list [email protected] http://www.rom.org/cgi-bin/mailman/listinfo/rom -- ROM mailing list [email protected] http://www.rom.org/cgi-bin/mailman/listinfo/rom

