Page 2 of 2

Re: Reversi Tutorial / Board not showing

Posted: 11 September 2024, 13:53
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?

Re: Reversi Tutorial / Board not showing

Posted: 11 September 2024, 14:04
by thoun
Same as usual, make sure the file on the FTP folder was correctly updated. Nothing wrong done from what you say.

Re: Reversi Tutorial / Board not showing

Posted: 11 September 2024, 14:25
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.

Re: Reversi Tutorial / Board not showing

Posted: 11 September 2024, 15:01
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.

Re: Reversi Tutorial / Board not showing

Posted: 11 September 2024, 15:17
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.

Re: Reversi Tutorial / Board not showing

Posted: 15 September 2024, 20:46
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 ;)

Re: Reversi Tutorial / Board not showing

Posted: 13 October 2025, 04:48
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>
                `);

Re: Reversi Tutorial / Board not showing

Posted: 15 October 2025, 13:10
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.

Re: Reversi Tutorial / Board not showing

Posted: 15 October 2025, 15:48
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.

Re: Reversi Tutorial / Board not showing

Posted: 15 October 2025, 16:21
by thoun
I see this in the emptygame project:

Code: Select all

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