Page 1 of 2
Fatal error during creation of database: Not logged.
Posted: 30 April 2013, 18:47
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
Re: Fatal error during creation of database: Not logged.
Posted: 30 April 2013, 19:38
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,
Re: Fatal error during creation of database: Not logged.
Posted: 01 May 2013, 13:27
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
Re: Fatal error during creation of database: Not logged.
Posted: 01 May 2013, 14:30
by sourisdudesert
Hello,
Allright. In this case, use this one instead:
$this->gamestate->getActivePlayerList()
Cheers,
Re: Fatal error during creation of database: Not logged.
Posted: 01 May 2013, 15:13
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
Re: Fatal error during creation of database: Not logged.
Posted: 01 May 2013, 16:27
by sourisdudesert
Hello,
Absolutly: game state arguments are public. To send private infos you should use getAllDatas or notifyPlayer.
Cheers
Re: Fatal error during creation of database: Not logged.
Posted: 02 May 2013, 14:26
by pikiou
A private state arguments method would be a blessing!
I am working on something to emulate it and simplify the framework.
Re: Fatal error during creation of database: Not logged.
Posted: 02 May 2013, 21:42
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?
Re: Fatal error during creation of database: Not logged.
Posted: 02 May 2013, 21:48
by pikiou
In getAllDatas you can at least return private information concerning the current player...
Re: Fatal error during creation of database: Not logged.
Posted: 02 May 2013, 22:04
by Rudolf
...with possibility to see data of the other players...

... that's the pb pointed ...