Jump to content
MakeWebGames

50/50 Chance


SMOKEY_TEK

Recommended Posts

I made or well attempted to make a different 50/50 Chance, but I can't seem to get it to work right.. It works, but when someone tries to match my bet it doesn't do anything.. And when I try to remove my bet, nothing.. Can someone fix it for me, lol

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

Lawls, I guess not.. I'll just figure it out on my own, thanks for nothing :|

I am sorry but you can't expect everyone to jump and help out, especially on a dying forum as this one. Secondly, there are way too many issues in your script to just point it out. Hint, secure you $_GET as right people can insert sql injections if they wanted to

Link to comment
Share on other sites

  • 7 months later...

It's been a while since I coded anything but i'd say:

Don't suppress Errors like here: $betAmount = abs(@intval($_POST['betAmount']));

And the $_GET['something']

unless you have done something like this in classes, is a major security problem.

$_GET['something'] = mysql_real_escape_string($_GET['something']);

You should of just made a points mod (C&P) the money and changed the $_POST['money'] and changed it to points.

Then added a table and stuck em both together?

 

This code (from what i've read) isn't as random as it could be. You are giving the poster the value of 0 and the taker the value of 1.

You should randomize the value you give each player as much as possible.

Link to comment
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...