Page 1 of 1

Pay Multi Members

Posted: Tue Apr 10, 2012 4:45 pm
by Bonza
Need a little help

Iv made a script to be able to pay multi amount of members the same amount of chips

But im having a small problem

Result=Error
Error=Unknown account

Is the return message im getting

any pointers would be great or if some one would like to rebuild this script for me. let me know

Re: Pay Multi Members

Posted: Tue Apr 10, 2012 6:13 pm
by Kent Briggs
Bonza wrote: Result=Error
Error=Unknown account
You didn't mention which API function you are calling but most likely the Player parameter is wrong since it can't find the account that you are trying to modify.

Re: Pay Multi Members

Posted: Wed Apr 11, 2012 2:03 am
by Bonza
&Command=AccountsIncBalance

Is the command im calling

I know its working as when i only add 1 name to pay it works, But soon as i add 2+ names it fails

Re: Pay Multi Members

Posted: Wed Apr 11, 2012 9:13 am
by Kent Briggs
Bonza wrote:&Command=AccountsIncBalance
Is the command im calling
I know its working as when i only add 1 name to pay it works, But soon as i add 2+ names it fails
As you can see from the help file, there is no provision for specifying multiple players with that command. Put your code in a loop and call AccountsIncBalance once for each player:

AccountsIncBalance - increments the account balance of a player. Use a Player parameter to specify the player's name and an Amount parameter to specify the number of chips to add to the account. A "Balance" parameter is returned in the result indicating the player's new chip balance. This command is safe to use even while the player is logged in and playing.

Re: Pay Multi Members

Posted: Wed Apr 11, 2012 11:50 am
by PokerMavenDeveloper
You need to build a scrip that update each player one by one using a loop while or for.