Hey everyone, So I’m really new to unity, but i’m just trying to create something that stores the users locations so next time he loggs into the game he is in the same spot, however I keep an error
Here’s my code
using UnityEngine;
using System.Collections;
public class PostURL : MonoBehaviour {
void Start () {
Vector3 pos = new Vector3 ();
var user = database.userr;
string url = "http://www.website/storepos.php";
WWWForm form = new WWWForm();
form.AddField("position", pos);
form.AddField("user", user);
WWW www = new WWW(url, form);
StartCoroutine(WaitForRequest(www));
}
IEnumerator WaitForRequest(WWW www){
yield return www;
}
}
So basically it sends a username and a vector 3 to a php file, and that stores it in an MySQL database so I can recall them at a later date (At-least it should), However I keep getting this error:
Now I’m not sure if this is a simple fix, or if i’m doing this completely wrong but any help with be great, thanks in advance guys.