trying to imp-lement the serverside high score tutorial in my facebook game and keep running into errors.
Cannot use INT in a string, yet the tutorial preforms this task try to understand it.
IEnumerator GetScores (string name, int Xp, int Lvl, int Missions, int Cash, int Gold)
{
string hash = MD5.Md5Sum(secretKey);
string Account_get = UserAccountURL + "name" + name + "Xp=" + Xp + "Lvl=" + Lvl + "Gold=" + Gold + "Cash" + Cash + Missions + hash; // return php result return values...
WWW AccountReturn = new WWW (Account_get);
yield return Account_get;
if (AccountReturn.error != null)
{
print("Unable to get User account data" + AccountReturn.error);
}
else
{
// return sores as text on game objects.........
gameObject.GetComponent<GUIText>().text = name;
gameObject.GetComponent<GUIText>().text = Gold;
gameObject.GetComponent<GUIText>().text = Cash;
gameObject.GetComponent<GUIText>().text = Xp;
gameObject.GetComponent<GUIText>().text = Lvl;
}
}
need to retern values from the server database, with users “ID” / Name to return only their values not everyones values.