Correction d'un autre probleme de syntaxe
This commit is contained in:
parent
4df3c3c963
commit
664035a4bf
|
@ -16,6 +16,8 @@ function getDB() {
|
|||
}
|
||||
|
||||
function closeDB() {
|
||||
global $getDBSingleton;
|
||||
|
||||
if ($getDBSingleton) $getDBSingleton->close();
|
||||
}
|
||||
|
||||
|
|
|
@ -574,7 +574,7 @@ function setGame($user, $pgid, $gid, $answers)
|
|||
|
||||
$db->exec("commit;");
|
||||
$scores['total'] = $gameScore;
|
||||
$scores['nb] = $nbScores;
|
||||
$scores['nb'] = $nbScores;
|
||||
return $scores;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,9 +74,9 @@ function main()
|
|||
// On renvoie une nouvelle partie pour garder le client toujours bien alimenté.
|
||||
echo "{\"scoreTotal\":".$scores['total'];
|
||||
echo ',"scores":[';
|
||||
for (i = 0; i < $scores['nb']; i++) {
|
||||
if (i != 0) echo ',';
|
||||
echo $scores[i];
|
||||
for ($i = 0; $i < $scores['nb']; $i++) {
|
||||
if ($i != 0) echo ',';
|
||||
echo $scores[$i];
|
||||
}
|
||||
echo "],\"newGame\":";
|
||||
echo json_encode("".game2json($user, randomGame()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user