Page 1 of 1

Unexpected exception: Can't manage zombie player in this game state

Posted: 01 January 2018, 20:23
by quietmint
I don't understand what's wrong with zombie mode in my game. After starting a game, the active player quits game using gear menu > "quit this game" hyperlink instead of doing his turn. The current state defines a "zombiePass" transition used by my zombie function, but it's not getting executed for some reason. (Yes, this is in pre-production, not studio)

Instead, table is broken for all players with the following error (players cannot even chat):

Code: Select all

Unexpected exception: Can't manage zombie player in this game state (3)
#0 /var/tournoi/release/tournoi-171231-1530/www/include/APP_GameAction.inc.php(203): Table->checkReturnState()
#1 /var/tournoi/release/tournoi-171231-1530/www/include/APP_GameAction.inc.php(196): APP_GameAction->ajaxResponseWithResult(NULL)
#2 /var/tournoi/release/tournoi-171231-1530/www/include/APP_GameAction.inc.php(151): APP_GameAction->ajaxResponse()
#3 /var/tournoi/release/tournoi-171231-1530/www/include/webActionCore.inc.php(133): APP_GameAction->wakeup()
#4 /var/tournoi/release/tournoi-171231-1530/www/index.php(152): launchWebAction('coupcitystate', 'action_coupcity...', 'wakeup', false, false, NULL, true, false)
This is state #3 (current state) in the code:

Code: Select all

    3 => array(
        "name" => "playerStart",
        "description" => clienttranslate('${actplayer} must take an action.'),
        "descriptionmyturn" => clienttranslate('${you} must take an action.'),
        "type" => "activeplayer",
        "action" => "stPlayerStart",
        "possibleactions" => array( "act" ),
        "transitions" => array( "ask" => 10, "execute" => 80, "zombiePass" => 97 )
    ),
And this is the relevant portion of zombie turn function in the code:

Code: Select all

    public function zombieTurn($state, $active_player)
    {
        if (array_key_exists('zombiePass', $state['transitions'])) {
            if ($state['type'] == 'multipleactiveplayer') {
                $this->gamestate->setPlayerNonMultiactive($active_player, 'zombiePass');
            } else {
                $this->gamestate->nextState('zombiePass');
            }
...

Re: Unexpected exception: Can't manage zombie player in this game state

Posted: 01 January 2018, 21:17
by Victoria_La
I had similar bug https://en.boardgamearena.com/#!bug?id=5675
but the fix was to make sure the state zombie is in has the transition invoke from zombieTurn.
Your looks correct, you sure you redeployed this after your fixes? Is the more exceptions in this log? Because if zombieTurn
throws something it may be be similar error