Sign In Register

How can we help you today?

Start a new topic

ChallengeStartedMessage: nextPlayer

In the cloud on ChallengeStartedMessage, Spark.getData().nextPlayer appears to be null.  When does this get set?

1 person has this question

Hi Vince,

If you are writing Cloud Code for ChallengeStartedMessage, then Spark.getData().nextPlayer is expecting one of the incoming parameters to be "nextPlayer". You can find a list of the default ChallengeStartedMessage parameters through our api docs. To fix this, you would need to add an additional parameter called "nextPlayer" in your client code, which may have a reference to another player.


I want to know who's first to act and the order of play for each round. How does next player get set? When the challenge is created, someone is set to act first. When does this happen? Can I see this on the challenge started message?
As far as I understand it, game sparks randomly assigns who's first to act.
Login to post a comment