Not sure why "This move is not authorized now" when clicking on a stock component

Game development with Board Game Arena Studio
Post Reply
User avatar
Brederic
Posts: 26
Joined: 29 January 2013, 00:06

Not sure why "This move is not authorized now" when clicking on a stock component

Post by Brederic »

I have two items in my stock. When I click on either one it is selected. But a red bar appears with the message: "This move is not authorized now."

Why is that?

Thanks,
Brederic
Last edited by Brederic on 16 October 2016, 09:27, edited 1 time in total.
User avatar
Andy_K
Posts: 51
Joined: 13 February 2014, 15:59

Re: Not sure why "This move is not authorized now" which clicking on a stock component

Post by Andy_K »

It means the action you are validating against on the server side with the check action method isn't in the list of valid actions you have defined for the game state
User avatar
Brederic
Posts: 26
Joined: 29 January 2013, 00:06

Re: Not sure why "This move is not authorized now" when clicking on a stock component

Post by Brederic »

Thanks very much!
So I should check the current state in my SelectionChanged handler before calling checkAction() on anything.
User avatar
marcgenesis
Posts: 36
Joined: 27 August 2015, 01:53

Re: Not sure why "This move is not authorized now" when clicking on a stock component

Post by marcgenesis »

In your states.inc.php file, make sure the action is part of "possibleactions" and that it is written EXACTLY the same. You might want to make sure only the active player can select an item if the type of your state is activeplayer.

If you want further help, post your code for your selection, as well as the state part from your states.inc.php. It would be easier to pinpoint the problem.
Post Reply

Return to “Developers”