i have a scene to register, then another scene to play, and the last one is the ranking scene. But when i try to jump from the register scene, to the ranking scene to see the score without register first.
It says (ArgumentNullException: Argument cannot be null. Parameter name: s
How can i fox this error, to allow me see the ranking scene first before play.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class AddScore : MonoBehaviour {
void Start(){
AddPScore (0);
}
void AddPScore(int storeResult){
WWWForm form = new WWWForm ();
form.AddField ("user", LoginSystem.userName);
form.AddField ("score", storeResult);
WWW w = new WWW ("https://nfx.000webhostapp.com/AddScore.php",form);
StartCoroutine (receive (w));
Debug.Log("funcionou");
}
IEnumerator receive(WWW w){
yield return w;
if (w.error == null) {
}
}
}