Dupe Points Bug

Report bugs found in Poker Mavens

Dupe Points Bug

Postby Zabulus » Sun Sep 02, 2012 10:55 pm

If a person clicks WITHDRAW POINTS and Sits down at the same time (With their entire roll) they can burn you for the points.

I'll explain.

I have 5000 points.

I get ready to sit down at the table with 5k points
I click WITHDRAW POINTS and SIT AT TABLE at the same time.

I am now -5000 points in the client but I have my points & I have the 5000 points (chips) sitting.

The client shows me at -5000 points.

I have it marked to NO for negative balances but it doesn't stop this. If a person is negative it should boot them off the server or not let them play at all.
Zabulus
 
Posts: 39
Joined: Sat Feb 12, 2011 2:10 pm

Re: Dupe Points Bug

Postby Kent Briggs » Sun Sep 02, 2012 11:41 pm

Zabulus wrote:I click WITHDRAW POINTS and SIT AT TABLE at the same time.


What do you mean by "withdraw points"? There is no such function built into Poker Mavens. Are you referring to some API code you wrote yourself?
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3831
Joined: Wed Mar 19, 2008 8:47 pm

Re: Dupe Points Bug

Postby Zabulus » Mon Sep 03, 2012 4:52 am

Withdraw chips .api.

I figured as much. Something we wrote that's being abused? Okay, I'll see if we can fix it somehow.

I thought a fix might be either terminating instantly any user that has negative points or not allowing withdrawls if you are still connected to the client. Not sure how we'll fix this :(

Thanks

Zab
Zabulus
 
Posts: 39
Joined: Sat Feb 12, 2011 2:10 pm

Re: Dupe Points Bug

Postby Kent Briggs » Mon Sep 03, 2012 9:15 am

Zabulus wrote:Withdraw chips .api.


There's an AccountsDecBalance command in the API and it has a "Negative" parameter which governs what happens if you try to subtract more chips than the player currently has. From the docs:

AccountsDecBalance - decrements the account balance of a player. This command does not check to see if you have "Allow negative balance" turned on or not in the account settings. An "Amount" parameter is included in the response that specifies the number of chips that were actually subtracted. A "Balance" parameter is returned with the player's new chip balance. This command is safe to use even while the player is logged in and playing.

Player - account name
Amount - number of chips to subtract from account
Negative - optional parameter set to "Allow", "Zero", or "Skip". Use Allow (the default) to let the player's balance go below 0. Use Zero to reset the account to 0 if the command results in a negative balance. Use Skip to not subtract any chips if the result would be a negative balance.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3831
Joined: Wed Mar 19, 2008 8:47 pm

Re: Dupe Points Bug

Postby Zabulus » Mon Sep 03, 2012 10:47 am

Thanks hopefully we can fix it.

I think the issue is, it happens at the exact same time..
Zabulus
 
Posts: 39
Joined: Sat Feb 12, 2011 2:10 pm

Re: Dupe Points Bug

Postby Kent Briggs » Mon Sep 03, 2012 11:34 am

Zabulus wrote:Thanks hopefully we can fix it.

I think the issue is, it happens at the exact same time..


Most likely your programmer didn't set the Negative parameter to "Skip". All chip balance changes occur inside a critical section, which prevents multiple threads from accessing the same data variable simultaneously.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3831
Joined: Wed Mar 19, 2008 8:47 pm


Return to Bugs

Who is online

Users browsing this forum: No registered users and 5 guests

cron