Jump to content

Help Please

Recommended Posts

Hey everyone!


I have been working on a text based mafia game, and one of the pages is "Weed Farm".

In simple terms, Users can plant seeds and grow them. They can also upgrade there farm, the better the farm, the more they can grow.

Everything works perfect, other than when you plant the seeds, and wait 24 hours, when you go back to sell them, it says you have 0.


I guess for some of you guys it'll be simple code, but not for a Noob like me. Any help i will be thankful off. 


I have attached the necessary files, many thanks. 



Share this post

Link to post
Share on other sites

before anyone bothers with the OP's code, be advised -


1) it totals ~ 500 lines of uncommitted code.


2) it uses the mysql_ extension.


3) there's no sql injection security.


4) there is some javascrpt in it that evaluates escaped strings to various <td ,,,,,> html values. hopefully the OP won't replace that with something else by the time his thread edit time expires or when he posts more code.


5) there are a bunch of verbose lower-case variable names, like $upgrademoneyorcredits and $newleveltime...


6) the func.php file contains several sections of in-line php code along with some function definitions, one of which could be replaced with a number_format() call.


7) the main file has post method form processing code interspersed with html.


in short, it's impossible to tell what the code is doing now, in order to determine why it isn't working.


to the OP, this code needs to be rewritten, reversing everything mentioned in my list.

  • Like 1

Share this post

Link to post
Share on other sites

thanks for the heads up MacGyver i wasn't going to click on the links anyway but now i'll be sure not to view the later post either

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.