Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#11
|
||||
|
||||
Alright, so for some reason user exploretimes are not resetting each day, instead it's simply been accumulating over time, even when it's been over 24 hours. Is anyone else having this issue?
Excerpt from my "explorecentralview.php" PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) |
#12
|
||||
|
||||
...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 01:38 PM. |
#13
|
||||
|
||||
I found a coder who fixed the issue where it wasn't resetting. He also originally noticed the 'd' not being in quotes and told me to fix that, but it still wasn't working so he took a more thorough look at it and managed to find the problem. I'll post the revised code. (: Credits to blue for the fix. Works like a charm now. This system is a big part of my site! Love it. ^^
Keep in mind for anyone who uses it, the items, currency, adopts, etc parts aren't included. Put them after the "$random = rand(1,1506); " part. Also you may need to edit some parts of it like the $item part and such, as that's used on my site. PHP Code:
|
#14
|
||||
|
||||
There are definitely still potential issues that could use some polishing to take care of tiny caveats - say you last explored March 20th, and somehow the next time you came around to do that was April 20th, out of some ironic inconvenience?
__________________
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. |
#15
|
||||
|
||||
Hahaha now that would be a little funny. :x
|
#16
|
||||
|
||||
Thank you for sharing the fix! My users and I appreciate it <3
To fix that issue, Kyttias, couldn't one just also add in a month counter along with day?
__________________
My Mods Site (1.3.4, 2020 Mods) |
#17
|
||||
|
||||
Probably, so long as lastday is being stored with that info. ^^
__________________
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. |
#18
|
||||
|
||||
So with this feature does anyone know how/if I would be able to make it so that instead of automatically adding found cats/items to a user's account it would give them the option to either take or leave it?
__________________
My Mods Site (1.3.4, 2020 Mods) |
#19
|
||||
|
||||
Hmm, could anyone help me with something?
I'm setting up a new pet profile field called "Obtained from" which basically says where the adoptable originated (adopt page, shop, exploring, etc) however this code uses 'StockAdopt' to generate adopts, which is a shop adopt. I want to use a different type there so that I can say the adoptable came from the "Wilderness"(exploring) and not the market. I tried replacing 'StockAdopt' with 'Adopt' and 'Adoptable' but it's not working, lol. Anyone have any clues? EDIT: Nvm, of course I find a solution right after posting woops. Last edited by tahbikat; 12-23-2015 at 08:31 PM. |
#20
|
||||
|
||||
Re: Explore System - Help Please!
Okay, I saw the fix further in the thread, but I still can't get it to reset. Can someone show me in my code where it's wrong? I'm really having a hard time here. This is the code for my Egg Hunt game that I made for a on-site holiday, I added extra columns in the database, just like it says for the explore pages, then modified ONLY those parts of the code.
The regular explore pages don't reset either, so showing me what I did wrong here will also help me see where I went wrong on the others. Thanks! PHP Code:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Quest- Explore System (Open Source) | squiggler | Tutorials and Tips | 4 | 07-23-2020 01:07 PM |
How to create an image map | collierox | Tutorials and Tips | 3 | 03-13-2018 05:11 AM |
Explore Help? | cailynmae | Questions and Supports | 7 | 03-30-2017 12:37 AM |
Help Create This? | Abronsyth | Templates and Themes | 16 | 10-24-2011 04:05 PM |
How to create a a battle system ,shop and currency?? | SieghartZeke | Questions and Supports | 9 | 11-02-2009 01:15 AM |
What's New? |
What's Hot? |
What's Popular? |