Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.