I have following code in game. The game checks the winner and loser and send the values to the database. The problem now is, that the game only calls 1 WWW Request wiich is strange.
if (playerDataScript.playerTeam == playerStScript.playerTeam)
{
GetComponent<AudioSource>().PlayOneShot(loseClip);
Debug.Log ("You Lost");
okayButton.SetActive (true);
WWWForm form1 = new WWWForm ();
form1.AddField ("user", PlayerPrefs.GetString (LoginSystem.Settings.accountKey.ToString ()));
form1.AddField ("lose", "1");
form1.AddField ("gold", Random.Range(50,71));
form1.AddField("rating", Random.Range(17,31)); // Minus
WWW saveData1 = new WWW ("http://81.169.176.129/datasavelose.php",form1);
yield return saveData1;
}
else
{
GetComponent<AudioSource>().PlayOneShot(winClip);
okayButton.SetActive (true);
WWWForm form = new WWWForm ();
form.AddField ("user", PlayerPrefs.GetString (LoginSystem.Settings.accountKey.ToString ()));
form.AddField ("win", "1");
form.AddField ("gold", Random.Range(60,81));
form.AddField("rating", Random.Range(17,31)); // plus
WWW saveData = new WWW ("http://81.169.176.129/datasave.php",form);
yield return saveData;
}
My question: can i use 2 WWW Request with 2 different php files in the same script?