Dupe Points Bug

Report bugs found in Poker Mavens
Post Reply
Zabulus
Posts: 39
Joined: Sat Feb 12, 2011 2:10 pm

Dupe Points Bug

Post by Zabulus »

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.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Dupe Points Bug

Post by Kent Briggs »

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?
Zabulus
Posts: 39
Joined: Sat Feb 12, 2011 2:10 pm

Re: Dupe Points Bug

Post by Zabulus »

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
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Dupe Points Bug

Post by Kent Briggs »

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.
Zabulus
Posts: 39
Joined: Sat Feb 12, 2011 2:10 pm

Re: Dupe Points Bug

Post by Zabulus »

Thanks hopefully we can fix it.

I think the issue is, it happens at the exact same time..
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Dupe Points Bug

Post by Kent Briggs »

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