living_puppet Posted August 14, 2011 Report Posted August 14, 2011 (edited) [b]Warning[/b]: Division by zero in [b]/home/magicdue/public_html/ui/userprofile/load_profile.php[/b] on line [b]380[/b] On the character page at the bottom of the screen. Because the total days does not increment in the DB probably or column name is wrong. [b]See also :[/b] This account was opened on (DD.MM.YYYY H:M): [b]13.08.2011 14:12[/b] Activity days: [b]0% [/b] (A total of 2 out of 0 days) And I was active both days. EDIT: I tried refreshing with new cache (CTRL + SHIFT + R in mozzila) and still not fixed. Edited August 14, 2011 by living_puppet
Root Admin Chewett Posted August 14, 2011 Root Admin Report Posted August 14, 2011 there was a post about this somewhere else, Its because it divides the active days by total days(which is zero) so the result is undefined, I believe Mur called it a "feature" But really it should be caught and not just show an error.
living_puppet Posted August 14, 2011 Author Report Posted August 14, 2011 I searched the forums a little but I didn't find it anywhere else. I know what caused the problem but it is strange because active days are good and total days are not. Just make a cron on a 24h schedule with runs at 00:00 to increment total days with 1 or integrate it in another existing cron with has that schedule. But you have probably done exactly that, so the problem is with the initial date written first in the DB. Just my opinion and advice, nothing more Watcher and Chewett 1 1
living_puppet Posted August 14, 2011 Author Report Posted August 14, 2011 Partially fixed : Activity days: [b]100% [/b] (A total of 2 out of 1 days) total days should be 2, but it is ok for me I don't mind it, just wanted to point out a bug. Chewett and Watcher 1 1
Rendril Posted August 14, 2011 Report Posted August 14, 2011 It's not a bug, your account has had 2 [b]active[/b] days but is only 1 day old.
duxie Posted August 14, 2011 Report Posted August 14, 2011 (edited) [size=3][font=verdana,geneva,sans-serif] i was about to cry even without Rendrils explanation. I love the way you fix bug's, I really do! but try to understand the ordinary man's thoughts. it's like:[/font][/size] [size=3][font=verdana,geneva,sans-serif]- you bought one cup of tea, but you drank two![/font][/size] [size=3][font=verdana,geneva,sans-serif]- (wth?!)[/font][/size] [size=3][font=verdana,geneva,sans-serif]- pay for them!..[/font][/size] [size=3][font=verdana,geneva,sans-serif]i'm not sure about implementation, but c'mon, i'm pretty sure you can put "$activeDays = '(select whatever from whatever)'; if ($activeDays == 0) $activeDays = 1; else { (ordinary way) }" instead of skipping else statement [/font][/size] [size=3][font=verdana,geneva,sans-serif]and yeah, i know, it's way more complicated, but believe me - i'm not judging your voluntary job or something, it's just a friendly teasing [/font][/size] Edited August 14, 2011 by duxie
awiiya Posted August 15, 2011 Report Posted August 15, 2011 The implementation works something like this (and correct me if I'm wrong) The server keeps track of the exact moment that you opened your MD account. Each day, at the exact time you opened the account, your total day counter updates itself. However your active day counter updates whenever you log in on a given day. If you don't log in on that day, you miss a day. So for the first few days you'll gain two active days before 48 hours has elapsed. Awi
Root Admin Chewett Posted August 15, 2011 Root Admin Report Posted August 15, 2011 And in many cases before 24 hours have elapsed. But we DID have this conversation on the forum, and i just found it using the magic SEARCH! [url="http://magicduel.invisionzone.com/topic/9008-activity-days"]Thread[/url] [url="http://magicduel.invisionzone.com/topic/9008-activity-days/page__view__findpost__p__78287"]Murs Reply[/url]
Recommended Posts