Callum1021 Posted February 20, 2017 Share Posted February 20, 2017 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. weedfarm.php func.php Quote Link to comment https://forums.phpfreaks.com/topic/303248-help-please/ Share on other sites More sharing options...
NotionCommotion Posted February 20, 2017 Share Posted February 20, 2017 Hi Callum, Instead of attaching files, add your script in the post and use the script tags (the <> icon). Also, what are your specific questions? Quote Link to comment https://forums.phpfreaks.com/topic/303248-help-please/#findComment-1543106 Share on other sites More sharing options...
mac_gyver Posted February 20, 2017 Share Posted February 20, 2017 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. 1 Quote Link to comment https://forums.phpfreaks.com/topic/303248-help-please/#findComment-1543112 Share on other sites More sharing options...
ginerjm Posted February 20, 2017 Share Posted February 20, 2017 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 Quote Link to comment https://forums.phpfreaks.com/topic/303248-help-please/#findComment-1543121 Share on other sites More sharing options...
NotionCommotion Posted February 21, 2017 Share Posted February 21, 2017 before anyone bothers with the OP's code, be advised - Somebody, get a rope... Quote Link to comment https://forums.phpfreaks.com/topic/303248-help-please/#findComment-1543152 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.