I commented the lines 32 and 127 where it says this error takes place cant figure it out
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DataInserter : MonoBehaviour
{
public GameObject username;
public GameObject email;
public GameObject password;
private string inputUserName;
private string inputPassword;
private string inputEmail;
private bool EmailValid = false;
private string[ ] Characters =
{
“a”,“b”,“c”,“d”,“e”,“f”,“g”,“h”,“i”,“j”,“k”,“l”,“m”,“n”,“o”,“p”,“q”,“r”,“s”,“t”,“u”,“v”,“w”,“x”,“y”,“z”,
“A”,“B”,“C”,“D”,“E”,“F”,“G”,“H”,“I”,“J”,“K”,“L”,“M”,“N”,“O”,“P”,“Q”,“R”,“S”,“T”,“U”,“V”,“W”,“X”,“Y”,“Z”,
“1”,“2”,“3”,“4”,“5”,“6”,“7”,“8”,“9”,“0”,“_”,“-” };
string CreateUserURL = “http://hotbaevids.com/DataStackinCams/InsertUser.php”;
public void RegisterButton()
{
bool EM = false;
bool PW = false;
if (inputEmail != “”)
{
EmailValidation();
if (EmailValid) //this line is error line
{
if (inputEmail.Contains(“@”))
{
if (inputEmail.Contains(“.”))
{
EM = true;
}
else
{
Debug.LogWarning(“Email is Incorrect”);
}
}
else
{
Debug.LogWarning(“Email is Incorrect”);
}
}
else
{
Debug.LogWarning(“Email is Incorrect”);
}
}
else
{
Debug.LogWarning(“Email Field Empty”);
}
if (inputPassword != “”)
{
if (inputPassword.Length > 5)
{
PW = true;
}
else
{
Debug.LogWarning(“Password Must Be at Least 6 Characters Long”);
}
}
else
{
Debug.LogWarning(“Password Field Empty”);
}
if (EM == true && PW == true)
{
bool Clear = true;
int i = 1;
foreach (char c in inputPassword)
{
if (Clear)
{
inputPassword = “”;
Clear = false;
}
i++;
char Encrypted = (char)(c * i);
inputPassword += Encrypted.ToString();
}
}
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Space)) CreateUser(inputUserName, inputPassword, inputEmail);
if (Input.GetKeyDown(KeyCode.Return))
{
CreateUser(inputUserName, inputPassword, inputEmail);
if (inputUserName != “” && inputEmail != “” && inputPassword != “”)
{
RegisterButton();
}
}
}
public void CreateUser(string username, string password, string email)
{
WWWForm form = new WWWForm();
form.AddField(“usernamePost”, username);
form.AddField(“passwordPost”, password);
form.AddField(“emailPost”, email);
WWW www = new WWW(CreateUserURL, form);
}
void EmailValidation()
{
bool SW = false;
bool EW = false;
for (int i = 0; i < Characters.Length; i++)
{
if (inputEmail.StartsWith(Characters*))*
{ //error line
SW = true;
}
}
for (int i = 0; i < Characters.Length; i++)
{
if (inputEmail.EndsWith(Characters*))*
{
EW = true;
}
}
if (SW == true && EW == true)
{
EmailValid = true;
}
else
{
EmailValid = false;
}
}
}