api command about balance reset

For general discussion of the Poker Mavens software
Post Reply
dastgarmi
Posts: 7
Joined: Wed Feb 25, 2015 9:51 am

api command about balance reset

Post by dastgarmi »

hi every reader
is there any command for reseting the balance? i cant fint it in the cammand list in help file.
also not the "Account/sResetBalance"
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: api command about balance reset

Post by Kent Briggs »

dastgarmi wrote:is there any command for reseting the balance?
AccountsEdit in the API.
dastgarmi
Posts: 7
Joined: Wed Feb 25, 2015 9:51 am

Re: api command about balance reset

Post by dastgarmi »

thanks mr briggs
which one is?
should i use player and balance parameters and type 'reset' instead of amount?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: api command about balance reset

Post by Kent Briggs »

dastgarmi wrote:should i use player and balance parameters and type 'reset' instead of amount?
Amount has to be a number, whatever value you want to set it to.
dastgarmi
Posts: 7
Joined: Wed Feb 25, 2015 9:51 am

Re: api command about balance reset

Post by dastgarmi »

So what is different with changing balance amount and resetting balance to the started balance?!
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: api command about balance reset

Post by Kent Briggs »

dastgarmi wrote:So what is different with changing balance amount and resetting balance to the started balance?!
There is no difference. But there is already a function for doing that built into the client lobby menu if you have "Allow balance resets" enabled in the Account Settings group.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: api command about balance reset

Post by Kent Briggs »

I should add, the built-in reset function will first read the "Starting balance" value and make sure the player's balance is under that amount. If you want to replicate that part in your own script you would use the SystemGet command in the API to read the "BalanceStarting" property.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: api command about balance reset

Post by Kent Briggs »

One other difference I forgot: the LastReset field in the player's account settings gets reset to the current date and time when the internal feature is used. So you would also need to set that with AccountsEdit to duplicate the built-in reset function. That field is used when the "Balance reset minutes" greater than 0 to restrict how often a player can request a reset. You would have to perform your own check when making your own function.
Post Reply