View Single Post
  #5  
Old 02-21-2016, 07:22 PM
Kirko Kirko is offline
Registered Guest
Join Date: Dec 2014
Location: Texas
Posts: 61
Kirko is a jewel in the roughKirko is a jewel in the rough
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.0temp.temp.messageSizetemp.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(50temp.y33020);

          
//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 <= 25 temp.lines 25;
        
temp.+= 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.
Reply With Quote