api command about balance reset

For general discussion of the Poker Mavens software

api command about balance reset

Postby dastgarmi » Sun May 17, 2015 2:18 pm

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"
dastgarmi
 
Posts: 7
Joined: Wed Feb 25, 2015 9:51 am

Re: api command about balance reset

Postby Kent Briggs » Sun May 17, 2015 3:13 pm

dastgarmi wrote:is there any command for reseting the balance?


AccountsEdit in the API.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3765
Joined: Wed Mar 19, 2008 8:47 pm

Re: api command about balance reset

Postby dastgarmi » Mon May 18, 2015 8:39 am

thanks mr briggs
which one is?
should i use player and balance parameters and type 'reset' instead of amount?
dastgarmi
 
Posts: 7
Joined: Wed Feb 25, 2015 9:51 am

Re: api command about balance reset

Postby Kent Briggs » Mon May 18, 2015 9:19 am

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.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3765
Joined: Wed Mar 19, 2008 8:47 pm

Re: api command about balance reset

Postby dastgarmi » Mon May 18, 2015 9:50 am

So what is different with changing balance amount and resetting balance to the started balance?!
dastgarmi
 
Posts: 7
Joined: Wed Feb 25, 2015 9:51 am

Re: api command about balance reset

Postby Kent Briggs » Mon May 18, 2015 10:04 am

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 - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3765
Joined: Wed Mar 19, 2008 8:47 pm

Re: api command about balance reset

Postby Kent Briggs » Mon May 18, 2015 10:11 am

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 - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3765
Joined: Wed Mar 19, 2008 8:47 pm

Re: api command about balance reset

Postby Kent Briggs » Mon May 18, 2015 11:20 am

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.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3765
Joined: Wed Mar 19, 2008 8:47 pm


Return to General

Who is online

Users browsing this forum: Baidu [Spider] and 6 guests

cron