View Single Post
  #12  
Old 12-20-2015, 12:35 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,511
Kyttias is on a distinguished road
Default

...Nothing there looks wrong, in theory. Except that an else statement should be being used, probably, for clarity's sake.

That and it should be date('d'); not date(d);. Using d without quotes means you're looking for a constant by the name of d that you have not set, rather than it using it's parameter - it knows what 'd' is, but not d.

Therefore it's not checking today's date at all.

So it's really never resetting the counter. When it sees "If the last day is not ????ERROR????, do this" it will just ignore it, since... it's not a valid question to be asking. Because true/false things have to make sense. Not making sense doesn't equal false (or true) so it ignores it and moves on, never actually resetting anything. And it'll continue to run the code afterward as normal.

It might even be reading it as "If last day is not set" because it probably fills the error in with nothing. It's like a hanging sentence. If last day is not................? Not what? Well it is, it's a thing that exists, so continue! ...Computers, man.

It's a simple mistake, no biggie. Is this the fix we're looking for?
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 12-20-2015 at 12:38 PM.
Reply With Quote