Hello , what i need is to read the number from textBox user has added and assign the number to global variable.
Develop games in your browser. Powerful, performant & highly capable.
If you're triggering it from a button, then when the button is clicked set the global variable to TextBox.Text . You'll also probably want to set the textbox type to number. If you're going without the button, then have a different variable that stores the number. Then, have an event for when TextBox.Text != PreviousNumber and use it to set PreviousNumber = TextBox.Text .
Like this ?
yes like this , thank you , i forgot to INT