Text Field help

trying out some simple basically

putting a text field and the info
of that text field would depend on

button pressed of player

basically ive set up a simple scene

that has 3 scripts

1 script global script which contains the varaibles and such

and 2 scripts one for each button

for button A basically what it does is changes the value of the variable to 10

button B just simply changes the value of a variable to 30

now the 4th script a bit confused how to work

all i want to happen is whatever the value of the variable be displayed on to the text field

anyways here are my 3scripts

Script1 which holds the global variable

static var score: int = 0;

function Start () {

}

function Update () {

}

here are the 2 button scripts
Button A script

Button A

function Start ()

{
Gamemaster.score = 10 ;
Debug.Log (Gamemaster.score);
}

function Update () {

}

Button B

#pragma strict

function Start ()

{
Gamemaster.score = 30 ;
Debug.Log (Gamemaster.score);
}

function Update () {

}

then this script having issues with
…not sure whats wrong

sorry, I didn’t quiete understand what you want to do. Also your post is really hard to read. Please don’t use linebreaks every few words and also use code-blocks to format your code in the posting.

I guess you want a Data Binding (bind a text field to a variable of some object… update the text when the variable changes).
If this is what you want I have to tell you: This is not possible out of the box. With some own classes it is possible, but it is not easy to implement. Probably too complicated for your skill level (no offense… But your post doesn’t look like your a professional programmer).

If you want to achieve something different, please describe your problem in other words and with better formatting.

“But your post doesn’t look like your a professional programmer” because i aint proffessionally a programmer i am an artist…long story short what i want to happen what will happen the text in a text box would depend on what the value of a global int variable is