I tried doing what you did and got zeros like before. I seem to have bad luck with this, or I just screwed up somewhere in the script.
This is the part where it seems to be messing up, if anyone can see anything wrong.
PHP Code:
for(temp.i = 0; temp.i < temp.messageSize; temp.i++){
new GuiMLTextCtrl("Message_" @ temp.i){
useownprofile = true;
profile.modal = false;
profile.fonttype = "Arial";
profile.fontsize = 20;
profile.fontcolor = temp.textFormat ? "black" : "white";
profile.textshadow = true;
profile.shadowcolor = "black";
allowedtags = (temp.fromstaff ? {"img", "b", "font", "center"} : {"b", "img"});
alpha = temp.textFormat ? 0.3 : 1.0;
visible = true;
resize(50, temp.y, 330, 20);
//addtext(temp.message, true);
text = temp.message;
//thiso.catchevent(this, "onReflow", "onTest");
}
temp.obj = makevar("Message_" @ temp.i);
temp.lines = (@("Message_" @ temp.i).getLines());
echo(temp.lines); //echos nothing
temp.chat_height = temp.lines <= 0 ? 25 : temp.lines * 25;
temp.y += temp.chat_height;
}
Only other way I can think of fixing is getting the width of text and then getting the amount of lines by dividing the text width by Gui width.