Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 15-Jun-2011 06:45:19

louis
Member
Registered: 4-Jun-2011
Posts: 20

about kinect andy game score recording

hi, when i do the same work with andy kinect, i found that after game over, i type name and email address at here, but it can not record, when i click the "score" in menu interface, i can just see the high score interface but without any score recording.
could you please tell me where is problem?

Offline

#2 15-Jun-2011 08:31:53

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: about kinect andy game score recording

Hi louis,

we removed the score page for the distributed version, but the system is right here.
a php page was called to get the player list, with an another one for registration in the database

Offline

#3 15-Jun-2011 09:04:30

louis
Member
Registered: 4-Jun-2011
Posts: 20

Re: about kinect andy game score recording

hi, arkeon
Then is it possible for me to get the score page working?
Thanks for the reply!

Offline

#4 15-Jun-2011 10:41:47

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: about kinect andy game score recording

I can't give you all the php code but here the common page for user registration and list in the application

<?php
require_once("top.inc.php");

$list = $_REQUEST["list"];
$name = $_REQUEST["name"];
$score = $_REQUEST["score"];
$mtime = $_REQUEST["mtime"];
$email = $_REQUEST["email"];

if (!isset($list))
{
  if (($name != "") && ($score != 0))
  {
    $q = "INSERT INTO `scores`.`users` (`Id`, `Name`, `Score` ,`Time` ,`Email`) VALUES (NULL, '". addslashes($name) . "', ". $score . ", '". $mtime . "', '". addslashes($email) . "');";
    MBdd::query($q);
    require_once("bottom.inc.php");
  }
}
else
{
    $q = "SELECT * FROM `users` ORDER BY  `users`.`Score` DESC";
    $res = MBdd::query($q);
    echo "<scores>";
    while ($lig = MBdd::fetch_array($res))
    {
  echo "<user><name>" . stripslashes($lig["Name"]) . "</name>" . 
    "<time>" . stripslashes($lig["Time"]) . "</time>" .
    "<score>" . stripslashes($lig["Score"]) . "</score></user>";
  }
  echo "</scores>";
    MBdd::free_result($res);
}
?>

Offline

Board footer

Powered by FluxBB