Why doesn't work this?

I write (javascript):

if (myobject.gameObject.CompareTag(“Player”))
myobject.GetComponent(myscript).variablex=5;

And I get the following error in the console:

Unknown identifier ‘myscript’

myobject is correctly defined and of course the myscript script is attached to myobject gameobject…

Try putting the script name in quotes. “myscript”

Thanks.

Capitalization makes a difference, too. Also, I’ve found that quotes are necessary when one script is in one language and the other script is in a different language.