Pay Multi Members

For discussion of the Poker Mavens server module and other administration topics
Post Reply
Bonza
Posts: 31
Joined: Fri Feb 17, 2012 2:54 pm
Location: UK
Contact:

Pay Multi Members

Post 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
Image
New Team Concept poker site
http://www.huskyteampoker.co.uk
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Pay Multi Members

Post 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.
Bonza
Posts: 31
Joined: Fri Feb 17, 2012 2:54 pm
Location: UK
Contact:

Re: Pay Multi Members

Post 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
Image
New Team Concept poker site
http://www.huskyteampoker.co.uk
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Pay Multi Members

Post 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.
PokerMavenDeveloper
Posts: 66
Joined: Fri Feb 24, 2012 5:11 pm

Re: Pay Multi Members

Post by PokerMavenDeveloper »

You need to build a scrip that update each player one by one using a loop while or for.
Post Reply