Page 1 of 1

When I reload my game "triatri", the score is displayed as "-".

Posted: 26 January 2023, 19:01
by Yu-wolf-or-Oru
Hi everyone,

I have been working on a game of my own creation that can be played on BGA as a way to learn programming.
Finally, I was able to make it into an alpha version.

But now I'm in a bit of a bind.

When I reload my game 'triatri', the score at player panel is displayed as "-".
The player_score is calculated correctly in the database, but does anyone know the cause?

Greetings
Oru

Re: When I reload my game "triatri", the score is displayed as "-".

Posted: 26 January 2023, 20:27
by GTSchemer
This will happen if getAllDatas() in PHP does not return a "players" table which contains player_id and player_score. Example:

Code: Select all

$sql = "SELECT player_id id, player_score score FROM player";
$players = self::getCollection($sql);

return [ "players" => $players, "whatever" => $whatever ];

Re: When I reload my game "triatri", the score is displayed as "-".

Posted: 27 January 2023, 03:40
by Yu-wolf-or-Oru
Dear GTSchemer

Thanks to your advice I have solved the problem.
Thank you so much!

oru

Re: When I reload my game "triatri", the score is displayed as "-".

Posted: 27 January 2023, 05:12
by GTSchemer
You are most welcome. :D