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.
Dupe Points Bug
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Dupe Points Bug
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 wrote:I click WITHDRAW POINTS and SIT AT TABLE at the same time.
Re: Dupe Points Bug
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
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
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Dupe Points Bug
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:Zabulus wrote:Withdraw chips .api.
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.
Re: Dupe Points Bug
Thanks hopefully we can fix it.
I think the issue is, it happens at the exact same time..
I think the issue is, it happens at the exact same time..
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Dupe Points Bug
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.Zabulus wrote:Thanks hopefully we can fix it.
I think the issue is, it happens at the exact same time..