Fatal error during creation of database: Not logged.

Game development with Board Game Arena Studio
User avatar
tilalilalou
Posts: 78
Joined: 05 August 2011, 08:40

Fatal error during creation of database: Not logged.

Post by tilalilalou »

Hello,

I have this error during game creation : Fatal error during creation of database xxx : Not logged.
I identified the origin : a call to getCurrentPlayerId() in method "argMyGameState", where "myGameState" is my first game state with id 2 (apart from gameSetup).

The thing is, if I remove the call to getCurrentPlayerId(), start the game, then write the call back, it works, and I get my arguments.

I believe something must be done in the wrong order during game initialization : I should be able to access currentPlayerId in any state arguments method. This method should be called after getAllData, in which getCurrentPlayerId works.

Thanks for reading,

Tilalilalou
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: Fatal error during creation of database: Not logged.

Post by sourisdudesert »

Hi,

In fact, you should not use getCurrentPlayerId but getActivePlayerId. getCurrentPlayerId means nothing in the setup phase or during a "arg" method.

Cheers,
User avatar
tilalilalou
Posts: 78
Joined: 05 August 2011, 08:40

Re: Fatal error during creation of database: Not logged.

Post by tilalilalou »

Hi,

Thanks for that information ! However, this is an "arg" method of a multipleactiveplayer state : it seem strange to use getActivePlayerId in this context.

Cheers,

Tilalilalou
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: Fatal error during creation of database: Not logged.

Post by sourisdudesert »

Hello,

Allright. In this case, use this one instead:
$this->gamestate->getActivePlayerList()

Cheers,
User avatar
tilalilalou
Posts: 78
Joined: 05 August 2011, 08:40

Re: Fatal error during creation of database: Not logged.

Post by tilalilalou »

Hi,

I wasn't clear : I'm in a game state arguments method, but I want to send specific arguments to each player.
From what I understand, this is not possible, and I have to use getAllDatas / notifyPlayer ?

Tilalilalou
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: Fatal error during creation of database: Not logged.

Post by sourisdudesert »

Hello,

Absolutly: game state arguments are public. To send private infos you should use getAllDatas or notifyPlayer.

Cheers
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: Fatal error during creation of database: Not logged.

Post by pikiou »

A private state arguments method would be a blessing!
I am working on something to emulate it and simplify the framework.
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: Fatal error during creation of database: Not logged.

Post by Rudolf »

by the way this post is also linked to the fact that the PHP must be able to send private info that cannot be sniffed by the other players...
In some games, informations of the other players are sent to the javascript.
Event it's not shown by the code, a modification of the code can be done to filter and exploit data of other players (hidden cards waiting for example).
That's why (for 'Beye' by example), I modify the array 'result' after SQL request, with zero datas the cards that are hidden (table player added fields). To be sure that the js is not able to get this information for other players.
is it right?
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: Fatal error during creation of database: Not logged.

Post by pikiou »

In getAllDatas you can at least return private information concerning the current player...
User avatar
Rudolf
Posts: 566
Joined: 24 December 2011, 23:04

Re: Fatal error during creation of database: Not logged.

Post by Rudolf »

...with possibility to see data of the other players... ;) ... that's the pb pointed ...
Post Reply

Return to “Developers”