Label Rect

function DoMyWindow (windowID : int) {

if (GUI.Button (Rect (10,370,280,20), “text”))

{

w+=20;

text = true;
}

if(text)
{
cor = Rect (10, w, 280, 20);

 GUI.Label(cor,message);

}
What is wrong?

Try this:

var w : int = 20;
function DoMyWindow (windowID : int) {
  if (GUI.Button (Rect (10,370,280,20), "text")){
    w+=20;
    text = true;
  }
  if(text) {
    cor = Rect (10, w, 280, 20);
    GUI.Label(cor,message);
  }
}

Its looking for “message” I don’t see a declaration of “message” anywhere in your code. Try switching it to.

if (GUI.Button (Rect (10,370,280,20), “text”))

{
w+=20;

text = true; }

if(text) { cor = Rect (10, w, 280, 20);

GUI.Label(cor,text);
}

see if that helps.

victorafael Dont help,label not showing… If i calling

cor = Rect (10, w, 280, 20);
GUI.Label(cor,message);

In OnGUI it work but I need do this in MyWindow…