Hi All
I am trying without any luck to use var_dump, dump, debug , trace in game.php
I am only able to do so successfully in function getAllDatas() . This will show up on the game screen
I have tried everything : Usually there is no syntax errors, but also nothing in BGA request&SQL logs.
var_dump( $my_variable );
self::dump( 'name_of_variable', $variable );
self::debug( $message ); // not found in BGA request&SQL logs
self::trace( $message ); //not found in BGA request&SQL logs
$this->dump("var")
"echo" just gives me syntax errors.
An example of the state function I am trying to put in some debug codes is
Thanks a bunch for any help!!!!!!
I am trying without any luck to use var_dump, dump, debug , trace in game.php
I am only able to do so successfully in function getAllDatas() . This will show up on the game screen
I have tried everything : Usually there is no syntax errors, but also nothing in BGA request&SQL logs.
var_dump( $my_variable );
self::dump( 'name_of_variable', $variable );
self::debug( $message ); // not found in BGA request&SQL logs
self::trace( $message ); //not found in BGA request&SQL logs
$this->dump("var")
"echo" just gives me syntax errors.
An example of the state function I am trying to put in some debug codes is
Code: Select all
function stNewHand()
{
$this->cards->shuffle( 'deck' );
do { //draw starting card
$this->cards->pickCardForLocation( "deck", "cardsontable" );
$an8 = $this->cards->getCardsOfTypeInLocation( NULL, "8", "cardsontable" );
$holder = array_shift( $an8 );
self::dump('holder ', $holder['type_arg']);
if ( $holder['type_arg'] == "8" )
{
$this->cards->moveAllCardsInLocation( "cardsontable" , "deck" );
$this->cards->shuffle( 'deck' );
}
} while ( $holder['type_arg'] == "8" );
$players = self::loadPlayersBasicInfos();
foreach ( $players as $player_id => $player )
{
$cards = $this->cards->pickCards( 5, 'deck', $player_id );
self::notifyPlayer($player_id, 'newHand', '', array ('cards' => $cards ));
}
}