> From: Acido <acido@DVMUD.NET> > Hiyas! Hello > I think this has to do with the ascii pfiles system. It does. > The problem is that the time played stuff no longer works i don't really > know how long this has been going on as i first discovered it recently but > i didn't change any major stuff regarding the time system and i > crosschecked with an original circle 3.0 bpl14 and grepped for the birth, > logon, last_login and played and it seemed pretty much to be correct. > > Anyone else have had this problem after shifting to ascii pfiles?? Yup, here's the solution. The problem was that the time was never actually updated upon saving, like it is in stock. So when Sammy wrote the ascii pfile system, he forgot to write in these two lines to update the played time. Therefore, it was never updated. Find these lines in db.c save_char() : fbprintf(fl, "Brth: %d\n", ch->player.time.birth); fbprintf(fl, "Plyd: %d\n", ch->player.time.played); fbprintf(fl, "Last: %d\n", ch->player.time.logon); Replace them with : fbprintf(fl, "Brth: %d\n", ch->player.time.birth); ch->player.time.played += (long) (time(0) - ch->player.time.logon); ch->player.time.logon = time(0); fbprintf(fl, "Plyd: %d\n", ch->player.time.played); fbprintf(fl, "Last: %d\n", ch->player.time.logon); -Astaroth +------------------------------------------------------------+ | 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