Hi,
I got this error:
Then, at dinkydungeon.game.php it is:
I'm newbie here! Any suggestion/idea? Thanks in advance!
I got this error:
But in my dbmodel.sql it is:Unexpected error: Propagating error from gameserver 1 (method: createGame): Fatal error during dinkydungeon setup: Error while processing SQL request (mysql via TCP/IP): SELECT MAX( card_location_arg ) res FROM dungeon WHERE card_location='deck' Table 'ebd_dinkydungeon_634364.dungeon' doesn't exist (reference: GS1 16/10 23:38:58) (reference: GS0 16/10 23:38:58
Code: Select all
CREATE TABLE IF NOT EXISTS `dungeon` (
`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,
PRIMARY KEY (`card_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Code: Select all
class DinkyDungeon extends Table
{
function __construct( )
{
$this->dungeons = self::getNew( "module.common.deck" );
$this->dungeons->init( "dungeon" );
$this->adventurers = self::getNew( "module.common.deck" );
$this->adventurers->init( "adventurer" );
...
protected function setupNewGame( $players, $options = array() )
{
...
$this->monster_levels = [
1 => 20,
2 => 10,
3 => 4,
4 => 2,
];
$dungeons = array();
foreach( $this->monster_levels as $level => $amount )
{
for( $i = 0; $i < $amount; $i++ ){
$dungeons[] = array ('type' => $level,'nbr' => 1 );
}
}
$this->dungeons->createCards( $dungeons , 'deck');
...