Accesing variables in other script and scene

Hello i have 2 sript, scrPlayerGame and scrLoose. And 2 scene ScGame(scrPlayerGame) and ScLoose(scrLoose). In scrPlayerGame i have a string variable Loose and i want to print this variable in scrLoose, but i have problem with my code:

error is

How can i print my variable?

the “x” var is a script, but you must to write a string for GUI.Label, if the var you want to print is a string, then you can code:

let´s suppose that your var´s name is “myName” and this is a string

x = GameObject.Find("LooseHira").GetComponent("otherScriptName");

function OnGUI (){
GUI.Label ( Rect ( 10, 10, 350, 20), x.myName ) );

that should create a label with myName´s string var text … meaning: if the “myName” var is “Rederin”, then the GUI.Label will be called “Rederin”…

that will print on console the var myName from another script. but it must to be string .