Can anyone help me

Useer creation failed. Error #
UnityEngine.Debug:Log(Object)
c__Iterator0:MoveNext() (at Assets/Registration.cs:26)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

what is the problem :frowning:

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Registration : MonoBehaviour {
public InputField nameField;
public InputField passwordField;
public Button submitButton;
public void CallRegister() {
StartCoroutine (Register ());
}
IEnumerator Register() {
WWWForm form = new WWWForm();
form.AddField (“name”, nameField.text);
form.AddField (“password”, passwordField.text);
WWW www = new WWW (“http://localhost/sqlconnect/register.php”,form);
yield return www;
if (www.text == “0”) {
Debug.Log (“User created succesfully”);
UnityEngine.SceneManagement.SceneManager.LoadScene(0);
} else {
Debug.Log (“Useer creation failed. Error #” + www.text);:wink:
}
}
public void VerifyInputs()
{
submitButton.interactable = (nameField.text.Length >= 8 && passwordField.text.Length >= 8);
}
}

Hello @kralsporcu ,

From the code that you’re using, it seems that what you should check is your server-side code.

You need to make sure that the server response is “0” (if the registration was successful, from looking at your code) or some other value that can actually give you more information about what was the problem in your server.

It seems that now such a server is just returning an empty (or white-spaces) string.

A final recommendation is to use a more descriptive name on the title of your post because the title of this post is “Can anyone help me” is not giving any clue of which type of issue you’re having.

A better title, in this case, could be something like: “Help with an error while using WWWForm”. You can check other titles to give you an idea.

Good luck with your project!