Reversi Tutorial / Board not showing

Game development with Board Game Arena Studio
User avatar
Harry_Tuttle
Posts: 22
Joined: 28 September 2019, 08:23

Re: Reversi Tutorial / Board not showing

Post by Harry_Tuttle »

So I folowed along the wiki and added:

CREATE TABLE IF NOT EXISTS `board` (
`board_x` smallint(5) unsigned NOT NULL,
`board_y` smallint(5) unsigned NOT NULL,
`board_player` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`board_x`,`board_y`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

to the dbmodel.sql.

I started a new game and checked, but there is no table board in the database. I also get an error in the logs that the board table can not be found. Do I miss a step here?
User avatar
thoun
Posts: 1619
Joined: 10 December 2020, 22:25

Re: Reversi Tutorial / Board not showing

Post by thoun »

Same as usual, make sure the file on the FTP folder was correctly updated. Nothing wrong done from what you say.
User avatar
Harry_Tuttle
Posts: 22
Joined: 28 September 2019, 08:23

Re: Reversi Tutorial / Board not showing

Post by Harry_Tuttle »

make sure the file on the FTP folder was correctly updated
I struggled with this before? How can I make sure? I have set up vscode that updates happen automatically like described.
User avatar
thoun
Posts: 1619
Joined: 10 December 2020, 22:25

Re: Reversi Tutorial / Board not showing

Post by thoun »

I check with FileZilla, WinSCP works too.
If you can't find the issue, please share your project name, so I can have a look.
And if you want to join Dev discord (link in the studio doc), you'll probably get faster answers.
User avatar
Harry_Tuttle
Posts: 22
Joined: 28 September 2019, 08:23

Re: Reversi Tutorial / Board not showing

Post by Harry_Tuttle »

Now it worked.

I had to close and reopen vs code, enforce the sftp sync from local to Remote. And now the table is there.

Not sure why it didn't work before.

And thanks, I joined the discord.
User avatar
nicotacotac
Posts: 73
Joined: 20 March 2020, 13:42

Re: Reversi Tutorial / Board not showing

Post by nicotacotac »

Harry_Tuttle wrote: 11 September 2024, 15:17 I had to close and reopen vs code, enforce the sftp sync from local to Remote.
You also have a command palette to force sync in vscode ;)
User avatar
Meeplelowda
Posts: 3836
Joined: 14 March 2020, 10:31

Re: Reversi Tutorial / Board not showing

Post by Meeplelowda »

I know it must be exhausting to keep answering the same questions every few months. I did read over the other threads to try to find the answer.

Here's what happened. I edited my .css file and .js file as instructed in the "Add the board" section of the tutorial. I have confirmed that the board.jpg file is loading and is not the source of the error (I did have to sync my img folder, but at least I figured that part out myself). But I'm still getting the stuck at 10% "loading game art" hang, yes, even after ctrl+F5.

The thing is, the error I'm seeing in the console is not a part of the .js that I've touched. This error is being flagged at line 65:
TypeError: Cannot read properties of null (reading 'insertAdjacentHTML')

Here's the code at line 65 for context:

Code: Select all

                document.getElementById('player-tables').insertAdjacentHTML('beforeend', `
                    <div id="player-table-${player.id}">
                        <strong>${player.name}</strong>
                        <div>Player zone content goes here</div>
                    </div>
                `);
Play Now lobby 4ever! https://boardgamearena.com/lobby
User avatar
oBsiDiaN
Posts: 12
Joined: 25 April 2020, 03:19

Re: Reversi Tutorial / Board not showing

Post by oBsiDiaN »

I think you've removed/renamed the div with id="player-tables", that will cause the error you're seeing. If you don't need it you can remove that js or just retarget it to the new player container div.
User avatar
Meeplelowda
Posts: 3836
Joined: 14 March 2020, 10:31

Re: Reversi Tutorial / Board not showing

Post by Meeplelowda »

oBsiDiaN wrote: 15 October 2025, 13:10 I think you've removed/renamed the div with id="player-tables", that will cause the error you're seeing. If you don't need it you can remove that js or just retarget it to the new player container div.
Thanks. I will comment it out for now in case it will be used later in the tutorial, but I checked the VS Code timeline and I did not touch anything at all in the .js file (even accidentally) except this part:

Code: Select all

this.getGameAreaElement().insertAdjacentHTML('beforeend', `
  <div id="board">
  </div>
`);
So that player-tables div was there from the start, but didn't cause an issue initially.
Play Now lobby 4ever! https://boardgamearena.com/lobby
User avatar
thoun
Posts: 1619
Joined: 10 December 2020, 22:25

Re: Reversi Tutorial / Board not showing

Post by thoun »

I see this in the emptygame project:

Code: Select all

this.getGameAreaElement().insertAdjacentHTML('beforeend', `
                <div id="player-tables"></div>
            `);
Post Reply

Return to “Developers”