Page 1 of 1
[Solved] Error when loading game tutorial Reversi
Posted: 13 July 2021, 22:40
by Ryumizuhi
Hi,
I start the Reversi tutorial and in section Tokens, when I launch the game, the board appeared but not the token. When I Debug with F12, I have the error ''Failed to load ressource'' on an image that I not access to : the default_32.jpg. The game try to load this in the folder data/data/avatar that does'nt exist.
How can I fix it ?
Best regard
Ryu
Re: Error when loading game tutorial Reversi
Posted: 14 July 2021, 10:29
by robinzig
I also see similar errors in studio for avatars - I don't think they're relevant (most likely it's because your Studio accounts don't have an avatar? Never really given it much thought though!)
If your tokens aren't appearing, by far the most likely explanation is that your CSS changes aren't "seen" because the previous version is cached by the browser. Always use control-F5 when reloading after CSS changes while developing, so the file is reloaded rather than retrieved from the browser cache.
EDIT: if it isn't this, you can start debugging by inspecting the div where the token should be. Look at the styles in the inspector - does it have the expected styles (background-image and background-position)? If not, there's an issue with loading your CSS file (which could be cache-related). If so, then something else is up, but there should be some further clues.
Re: Error when loading game tutorial Reversi
Posted: 15 July 2021, 21:53
by Ryumizuhi
I have check my html result and I found the error : I have forgotten a '=' in var jstpl_token between the keyword 'class' and the definition of the classes.
var jstpl_token='<div class="token tokencolor_${color}" id="token_${x_y}"></div>';
Now the token is on the board :