public void RegisterUser() { functions db = GetComponent <functions>(); db.Conn(); string validator = ""; if (name.text == validator && password.text == validator && password2.text == validator) { errorhandler.text = "All Fields must be answered"; } else { if (password.text == password2.text) { db.Register(name.text, password.text); Debug.Log("Succesfully registered"); } else { errorhandler.text = "Password didn't match"; } } }