Cannot access information in material.inc.php from game layout
Posted: 23 May 2020, 11:52
I accessed the information in material.inc.php in the game layout. But I got an error.
material.inc.php
xisizetest.view.php
Why can't i access?
The document says that it can be accessed from the game object.
http://en.doc.boardgamearena.com/Game_l ... mename.tpl
Code: Select all
Notice: Undefined property: xisizetest::$TEXT in /var/tournoi/release/games/xisizetest/999999-9999/xisizetest.view.php on line 35
Code: Select all
$this->TEXT = [
'PLAYER' => "Player",
'CARD_EXP' => "Experience card",
'CARD_SKL' => "Skill card",
'CARD_AST' => "Assist card",
];Code: Select all
public function build_page($viewArgs){
...
$this->tpl['EXP_CARDS'] = $this->game->TEXT['CARD_EXP'];
...
}The document says that it can be accessed from the game object.
http://en.doc.boardgamearena.com/Game_l ... mename.tpl
Code: Select all
// Access to some game elements description described in your "material.inc.php":
$my_cards_types = $this->game->card_types;
// Access to any (public) method defined in my .game.php file:
$result = $this->game->myMethod();