Razor42 Posted June 26, 2013 Share Posted June 26, 2013 Hi there, Decided to do some coding for the community. It’s the first thing I have coded in quite a while so it’s pretty simple and if there are any issues then please let me know but their shouldn't be as I have tested and it all seems to work fine. What it does? It’s a simple hi low game, you get a number and then decided if the next number you’ll get is higher or lower. If you guess wrong then you lose and your pot is empty, if you guess correct then your right and you get $1000 added to your pot. You can also decide to collect your pot at any time. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Please post any bugs and I hope you all enjoy :). Quote Link to comment Share on other sites More sharing options...
Script47 Posted June 26, 2013 Share Posted June 26, 2013 Spelling mistake, just saying: "Guess wromg amd you loose!" - Line 25 Quote Link to comment Share on other sites More sharing options...
Dayo Posted June 26, 2013 Share Posted June 26, 2013 i would remove You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. As game owners may not want errors displaying Quote Link to comment Share on other sites More sharing options...
Razor42 Posted June 26, 2013 Author Share Posted June 26, 2013 Just had it in their for when I was testing. Will remove when I get on computer Quote Link to comment Share on other sites More sharing options...
Dayo Posted June 26, 2013 Share Posted June 26, 2013 looks nice, i made a hi/lo script the other day may be nice for you to merge the two together Quote Link to comment Share on other sites More sharing options...
Razor42 Posted June 26, 2013 Author Share Posted June 26, 2013 Yeah I used it to help me towards creating this, all thought there quite different there also similar. Learned alot about $_SESSION from yours to Help me create this as I'd never really used it before. Quote Link to comment Share on other sites More sharing options...
Dayo Posted June 26, 2013 Share Posted June 26, 2013 (edited) Glad you could use what i made to help you, sessions are very useful and very easy to use once you get use to them ;) Edited June 26, 2013 by Dayo Quote Link to comment Share on other sites More sharing options...
Razor42 Posted June 26, 2013 Author Share Posted June 26, 2013 Yeah I found them very useful when using his and their quite simple. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 27, 2013 Share Posted June 27, 2013 Sadly, You still haven't bother to message me your way is very time wasting as I needed it done with in the day after I assign you to the task. Here's a head up for you in the future let whomever hires you know what you are working on and how long it would take before taking the new task. Luckily I never depend on 1 unprofessional developer; the task is done don't bother to reply back to the message. Instead of derailing the topic post in this section http://makewebgames.io/forumdisplay.php/345-Collaboration-experiences Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted June 27, 2013 Share Posted June 27, 2013 Instead of derailing the topic post in this section http://makewebgames.io/forumdisplay.php/345-Collaboration-experiences Agreed and posts moved to [HERE] Quote Link to comment Share on other sites More sharing options...
sniko Posted June 27, 2013 Share Posted June 27, 2013 (edited) I've a few issues to raise. No need for session_start(); No need to error_reporting on, on a live version (this should be covered with testing) Possibly adopt heredoc Few spelling errors Why global variables that are not being used? You're doubling memory with assigning global variables to local variables (see below); You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It's exploitable, if you know how to alter session data. Your format is horrible, no offense. Perhaps check the contents of each $_SESSION, before bringing it into play in the script. Use mccode pre-defined functions (money_formatter) to echo out the winnings, etc. No idea what you were trying to achieve here. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This will suffice for line 81; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Sometimes PHP novices attempt to make their code "cleaner" by copying predefined variables to variables with shorter names before working with them. What this actually results in is doubled memory consumption (when the variable is altered), and therefore, slow scripts. In the following example, if a user had inserted 512KB worth of characters into a textarea field. This implementation would result in nearly 1MB of memory being used. https://developers.google.com/speed/articles/optimizing-php Edited June 27, 2013 by sniko Quote Link to comment Share on other sites More sharing options...
Razor42 Posted June 27, 2013 Author Share Posted June 27, 2013 1) how come I don't need session start? As stated before $_SESSION is pretty new to me. 2) As stated once again I was going to remove that when I got on a computer which I haven't yet. 3) Herdoc ? What's that? 4) These have been fixed on my live version just not had chance to update the posted code yet. 5) Just a habit I have obtained. Will sort this. 6) $guess = $_GET['Guess']; was my original way of doing it but it no longer needs that so ill clean the code up when I get time. 7) Would be nice of you showed the exploits and how they can be fixed. 8) Format is horrible how? Just a few questions to your post to help me learn more from your feedback :) Quote Link to comment Share on other sites More sharing options...
sniko Posted June 27, 2013 Share Posted June 27, 2013 1) how come I don't need session start? As stated before $_SESSION is pretty new to me. 2) As stated once again I was going to remove that when I got on a computer which I haven't yet. 3) Herdoc ? What's that? 4) These have been fixed on my live version just not had chance to update the posted code yet. 5) Just a habit I have obtained. Will sort this. 6) $guess = $_GET['Guess']; was my original way of doing it but it no longer needs that so ill clean the code up when I get time. 7) Would be nice of you showed the exploits and how they can be fixed. 8) Format is horrible how? Just a few questions to your post to help me learn more from your feedback :) session_start is in globals.php Okay heredoc Okay Bad habit Okay My original point was to try and use the database (it would allow multiple uses of the hi-low script, without session timeout) If you load the script into Netbeans (for example), go to Source > Format, you will see. Quote Link to comment Share on other sites More sharing options...
Razor42 Posted June 27, 2013 Author Share Posted June 27, 2013 1) Ah right, okay. 2) I'll look at this when I get home 7) Okay 8) Okay Quote Link to comment Share on other sites More sharing options...
Smokey Posted June 29, 2013 Share Posted June 29, 2013 All you have to do is start your game, then refresh the page until you get a safe number to bet high or low on, so if you know how to use it you will virtually never lose.. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted June 29, 2013 Share Posted June 29, 2013 All you have to do is start your game, then refresh the page until you get a safe number to bet high or low on, so if you know how to use it you will virtually never lose.. Maybe what you can do is provide a unique session as a hidden input field in the index and have it check to make sure that is what it actually is to stop refreshers Quote Link to comment Share on other sites More sharing options...
Legaci Posted June 29, 2013 Share Posted June 29, 2013 (edited) just an alteration not a bad mod just a lot of altering You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. this is just long cut to the chase and add this instead You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. making the action=play skips straight the the necessary point Edited June 29, 2013 by Dominion Fixed php tags Quote Link to comment 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.