appwarp turn-base game multiplayer sendMove error

0 votes

hi guys,

im trying to create a turn base online game, the problem begins after the third or the forth turn.

while sending a move to the other player, with sendMove() Im getting an badrequest error (4).

I think that the problem accures because the user dose'nt send the request in his turn, is there a way to check who's turn is it before sending the move


thanks in advance 

Gal

asked Sep 27, 2014 in AppWarp by galshalit (22 points)
recategorized Oct 26, 2014 by sushil

1 Answer

+1 vote
 
Best answer
Hi Gal,

This is the expected behaviour.

Only the player whose turn it is can send the move else server will reject the turn and give badrequest error.

When server sends the move data to all the players, in addition to that server also sends the nextTurn information and you can check if it is intended for you then make your move else ignore it.
answered Sep 27, 2014 by NaveenGShephertz (244 points)
selected Sep 27, 2014 by galshalit
thanks that works great
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...