Stats seemingly not working.
Posted: 27 October 2015, 22:11
Gah!
I'm having trouble with the statistics.
No matter what I do, I get an error like so:
when I try to initstat any stat.
I have reloaded statistics configuration to update stats.inc.php in the control panel, and it looks like this:
and my call to initstat is in setupNewGame in game.php and looks like:
What is going wrong here?
I'm having trouble with the statistics.
No matter what I do, I get an error like so:
Code: Select all
Unexpected error: Propagating error from GS 1 (method: createGame): Fatal error during thisismytestgame setup: Unknow statistic id: table turnsNumberI have reloaded statistics configuration to update stats.inc.php in the control panel, and it looks like this:
Code: Select all
$stats_type = array(
"table" => array(
"turnsNumber" => array("id"=> 10,
"name" => totranslate("Number of turns"),
"type" => "int" ),
),
"player" => array(
"coveredOwn" => array( "id"=> 10,
"name" => totranslate("Amount of own letter covered."),
"type" => "int" ),
"coveredOther" => array( "id"=> 11,
"name" => totranslate("Amount of opponent's letter covered."),
"type" => "int" ),
"coveredBlank" => array( "id"=> 12,
"name" => totranslate("Amount of spaces with no letter covered."),
"type" => "int" )
)
);Code: Select all
self::initStat( 'table', 'turnsNumber', 0 );
self::initStat( 'player', 'coveredOwn', 0 );
self::initStat( 'player', 'coveredOther', 0 );
self::initStat( 'player', 'coveredBlank', 0 );