Matt Read <mjr@doc.ic.ac.uk> writes: > >Ok, having worked out what time the MOTD_FILE was last modified we have another > problem. I've tried comparing that value with d->character->player.time.logon, > should it in fact be compared with tmp_store.last_logon? If this is so, why > do I sometimes get strange values from tmp_store.last_logon, for example - > Jan 1st 1970? > > What is the difference between the last_logon in char_file_u and the > ->player.time.logon in char_data? last_logon in the char_file_u is set to the current time when a player is saved. Thus, you need to make sure that you get the value before the character gets saved (which I believe happens pretty soon after they get loaded). The d->character->player.time.logon gets set both at load and save. Which means it's not the "last logon" when you load the player up. As for Jan 1, 1970, that's the value you'll get when the logon variables are set to 0 (like a new character). What you might want to do is stop the d->character->player.time.logon from getting set at load time, and make it set just at save time. Since players get saved before they enter the game, their time should be set right by the time they get in. -Jeff
This archive was generated by hypermail 2b30 : 12/07/00 PST