Hello,
Im just getting new in unity multiplayer but i am great at webdeveloping so i want to connect my game to my site.
I just need to take more information out of my database like there cash and dinar.
I want to make this like a public void who i can call:
public void upCheck () {
string url = "http://example.com/script.php";
WWWForm form = new WWWForm();
form.AddField("var1", "value1");
form.AddField("var2", "value2");
WWW www = new WWW(url, form);
StartCoroutine(WaitForRequest(www));
IEnumerator WaitForRequest(WWW www)
{
yield return www
// check for errors
if (www.error == "null")
{
Debug.Log("WWW Ok!: " + www.data);
} else {
Debug.Log("WWW Error: "+ www.error);
}
}
}
But the problem is this isn’t working i recieve the error:
Assets/scenes/Playermanager.cs(74,43): error CS1525: Unexpected symbol (', expecting )‘, ,', ;’, [', or =’