Hi Boy i use the Server Side Highscores for access database whit php file is work ok
http://www.unifycommunity.com/wiki/index.php?title=Server_Side_Highscores
but now have a problem the tuorial is write in js version is possibile convert the HSController.js in c# version
private var secretKey=“mySecretKey”; // Edit this value and make sure it’s the same as the one stored on the server
var addScoreUrl=“http://localhost/unity_test/addscore.php?”; //be sure to add a ? to your url
var highscoreUrl=“http://localhost/unity_test/display.php”;
function Start() {
getScores();
}
function postScore(name, score) {
//This connects to a server side php script that will add the name and score to a MySQL DB.
// Supply it with a string representing the players name and the players score.
var hash=Md5.Md5Sum(name + score + secretKey);
var highscore_url = addScoreUrl + “name=” + WWW.EscapeURL(name) + “&score=” + score + “&hash=” + hash;
// Post the URL to the site and create a download object to get the result.
hs_post = WWW(highscore_url);
yield hs_post; // Wait until the download is done
if(hs_post.error) {
print("There was an error posting the high score: " + hs_post.error);
}
}
// Get the scores from the MySQL DB to display in a GUIText.
function getScores() {
gameObject.guiText.text = “Loading Scores”;
hs_get = WWW(highscoreUrl);
yield hs_get;
if(hs_get.error) {
print("There was an error getting the high score: " + hs_get.error);
} else {
gameObject.guiText.text = hs_get.data; // this is a GUIText that will display the scores in game.
}
}
i request it becouse i use Dimerocker API write in c# end i wont insert the value of Facebook user in my database but is not easy becus the tutorial is vrite in js the Api is in c#
you can help me?