Sign In Register

How can we help you today?

Start a new topic
Answered

Trying to register new user

   I'm having some troubles with this script, for some reason it doesn't let me do this.

Whats the problem with it? How can I solve it?  

public void Reg_Click(){

RegistrationResponse response = new RegistrationRequest().SetUserName("x").SetDisplayName("x").SetPassword("x").Send();        
 if (!response.HasErrors)
        {
            Estado.text = "Sucess";
        }
        else
        {
            Estado.text = "Error";
        }
}

      

png
(9.89 KB)

Best Answer
The blocking Send() method doesn't exist anymore since SDK version 5.

Try it like this:

 

        public void Reg_Click()
        {
            new RegistrationRequest().SetUserName("x").SetDisplayName("x").SetPassword("x").Send((response) => {
                if (!response.HasErrors)
                {
                    Estado.text = "Sucess";
                }
                else
                {
                    Estado.text = "Error";
                }
            });
        }

 


 

1 Comment

Answer
The blocking Send() method doesn't exist anymore since SDK version 5.

Try it like this:

 

        public void Reg_Click()
        {
            new RegistrationRequest().SetUserName("x").SetDisplayName("x").SetPassword("x").Send((response) => {
                if (!response.HasErrors)
                {
                    Estado.text = "Sucess";
                }
                else
                {
                    Estado.text = "Error";
                }
            });
        }