Help int.Parse "Input String was not in the correct format" PROBLEM
Hey all! I get " Input string was not in the correct format" error. I used "public text ..." but did not worked. How should I implement these entryCount and dataOutput? Any ideas or suggestions ??
Thanks Vael
public void GetLeaderBoard ()
{
Debug.Log(" Fetching Leaderboard Data...");
new GameSparks.Api.Requests.LeaderboardDataRequest().SetLeaderboardShortCode("SCORE_LEADERBOARD").SetEntryCount(int.Parse(entryCount.text)).Send((response) =>
{
if (!response.HasErrors)
{
Debug.Log("Found Leaderboard Data...");
outputData.text = System.String.Empty;
foreach (GameSparks.Api.Responses.LeaderboardDataResponse._LeaderboardData entry in response.Data)
{
int rank = (int)entry.Rank;
string playerName = entry.UserName;
string score = entry.JSONData["SCORE"].ToString();
outputData.text += rank + " Name: " + playerName + " Score:" + score + "\n";
}
}
else
{
Debug.Log("Error Retrieving Leaderboard Data");
}
}); }
Comment