So I got a couple of questions here. First one is how can I make it to where the Inputbox text can be saved as a string in code/script (preferably C#).
This is what i've tried so far with UserInput & Pass being called on the OnEditEnd() event of the inputbox's. and with UserName_Checked on the OnClick() of the button. Basically it downloads the page from the api and checks if they have an account set up.
public void UserInput (string UserInput)
{
UserName = UserInput;
}
public void PassInput (string PassInput)
{
Password = PassInput;
}
public void UserName_Checked(string Lobby)
{
string ActiveCheck = "http://d************?u=" + UserName + "&p=" + Password + "&****";
WebRequest request = WebRequest.Create(ActiveCheck);
request.Method = "GET";
WebResponse response = request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream);
string Active = reader.ReadToEnd();
reader.Close();
response.Close();
if (Active == "accepted")
{
Application.LoadLevel(Lobby);
}
else if (Active == "wrong")
{
//Plan on doing a popup that says no user exists.
}
}
Image of what Call event looks like
![alt text][1]
[1]: http://i.gyazo.com/6895ba033daef7ff21347f92cbb1b2ca.png
↧