Use variable from another script with WWW give NULL?

Hi, I’m trying to use a variable from another script attached to “Main Camera”. I do get the variable to output correctly on Debug.Log and GUI.Label but I can’t get it to work with WWW…

EDIT NOTE: At this point I have already successfully logged in with the Wusername. I’m trying to query another DB with a already successfully used variable.

public string Wusername;

Wusername = GameObject.Find("Main Camera").GetComponent<login>().userNameGet;

				WWWForm form = new WWWForm();
				form.AddField(Wusername, Wusername);
				form.AddField("securityKeyGetCharInfo", securityKeyGetCharInfo);
				WWW GetCharacterAPI = new WWW(secureKeyGetCharInfoURL, form);

The web page is receiving Wusername as null. What could I do to fix this?

I want this to be able to work without having to type it in a textfield again. If it can’t be done I’d like to know another way to do this.

Thanks in advance for your time and help! :slight_smile:

A slight typo. With a fresh mind which had gotten It’s sleep found the problem to be the missing quotes.

form.AddField(“Wusername”, Wusername);

This works as intended now and I will keep fixing. Thanks JChilton, sorry I missed it!