Page 1 of 1

This Move Is Not Authorized Now [Hearts Tutorial]

Posted: 25 July 2024, 01:26
by Durt
Hey forum,

I'm a beginner developer and am working through the hearts tutorial in BGA studio. I got about 50-60% of the way through the tutorial, but was experiencing this issue (attached). After scrapping my initial test project and restarting to find where the issue was (I don't have version control setup cause I couldn't figure out how to set up the sync in Github), I have an idea of where something could be messed up.

In the section where you add the

Code: Select all

 dojo.connect( this.playerHand, 'onChangeSelection', this, 'onPlayerHandSelectionChanged' );
this is causing the issue. If that is not added to the code, the cards are clickable, but no action is taken. It could be something with my code in the action method in my .js file, but I'm not sure.

https://drive.google.com/file/d/1Rckl3y ... sp=sharing
https://drive.google.com/file/d/1zY7MgF ... sp=sharing

I also checked the code in the final product of the heartsla.js file (https://github.com/elaskavaia/bga-heart ... eartsla.js) and didn't see anything different. However, because there is additional code in those git files, I could be missing something. But following the hearts tutorial within the wiki, I'm confused as to why I'm running into this "Move not authorized" error.

Any help here is much appreciated!
-Durt

Re: This Move Is Not Authorized Now [Hearts Tutorial]

Posted: 25 July 2024, 11:20
by nicotacotac
if you get message error message, it's always good to check this wiki page : https://en.doc.boardgamearena.com/Troubleshooting

and for your specific case : https://en.doc.boardgamearena.com/Troub ... orized_now

the error you see is generated by the checkAction() function that check if your action is in the possible actions of your states.

Check the states.inc.php and add your action in the "possibleactions" array

Re: This Move Is Not Authorized Now [Hearts Tutorial]

Posted: 09 August 2024, 19:56
by Durt
Thanks for this! I think it's working as expected now.