Hi,
I'm trying to define a deck with card with a custom field in this way but in my bd the 'direction' field is always empty : (
Can someone help me finding the error?
dbmodel
I'm trying to define a deck with card with a custom field in this way but in my bd the 'direction' field is always empty : (
Can someone help me finding the error?
dbmodel
material.inc.phpCREATE TABLE IF NOT EXISTS `cardGK` (
`card_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`card_type` varchar(16) NOT NULL,
`card_type_arg` int(11) NOT NULL,
`card_location` varchar(16) NOT NULL,
`card_location_arg` int(11) NOT NULL,
`direction` varchar(16) NOT NULL,
PRIMARY KEY (`card_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
xxxxx.game.php$this->goalKeeperCars[] = array( 'type' => 'goalkeeper', 'type_arg' => 3, 'direction' => 'dx' , 'nbr' => 1 );
$this->goalKeeperCars[] = array( 'type' => 'goalkeeper', 'type_arg' => 3, 'direction' => 'sx' , 'nbr' => 2 );
..
Thank you in advice ^^__construct( ){
..
$this->GKDeck = self::getNew( "module.common.deck" );
$this->GKDeck ->init( "cardGK" );
}
setupNewGame( $players, $options = array() ){
..
$this->GKDeck->createCards($this->goalKeeperCars, 'deck' );
}