Game action cannot return any data ?
Posted: 09 April 2013, 14:41
Hello,
I have a state in which current player have to select 2 hexagons to play his move.
Allowed hexagons for 2nd selection depends on the 1st one. The method exists on server side, so i'm trying to implement a game action returning allowed hexagons depending on the first selection. I tried this :
self::ajaxResponse($response);
but i'm getting the following error :
Unexpected error: Game action cannot return any data
I do not want to create a state, because I would have to save somewhere the first hexagon selection, and a cancel would be hard to implement.
I also would like not to implement in client side what already exists on server side.
And for performance reasons, I think it would be a bad idea to return all allowed second moves based on every allowed first moves in state arguments.
What can I do ?
I have a state in which current player have to select 2 hexagons to play his move.
Allowed hexagons for 2nd selection depends on the 1st one. The method exists on server side, so i'm trying to implement a game action returning allowed hexagons depending on the first selection. I tried this :
self::ajaxResponse($response);
but i'm getting the following error :
Unexpected error: Game action cannot return any data
I do not want to create a state, because I would have to save somewhere the first hexagon selection, and a cancel would be hard to implement.
I also would like not to implement in client side what already exists on server side.
And for performance reasons, I think it would be a bad idea to return all allowed second moves based on every allowed first moves in state arguments.
What can I do ?