Jump to content

help guiSetText [urgent]solved


Anubhav

Recommended Posts

Posted (edited)

ok I was making a login GUI with tabs and some memo in it.

I have 2 client files:

gui.lua

client_handler.lua

gui.lua loads first and has the memo

  
GUIEditor.memo[2] = guiCreateMemo(0, 0, 806, 535, "", false, GUIEditor.tab[3])    
guiMemoSetReadOnly(GUIEditor.memo[2], true) 
  

but now I want to set the text of the memo in client_handler.lua, I get no error and it's still blank. ( I have outputted the text and it seemed fine. The text was pretty long.

  
function guiSetStaffList( list ) 
    local setText = "" 
    local timesDone = 0 
    for i,v in ipairs( list ) do 
        if timesDone == 0 then 
            setText = v.Rank..": "..v.Players 
            timesDone = timesDone + 1 
        else 
            setText = setText.."\n\n\n\n"..v.Rank..": "..v.Players 
            timesDone = timesDone + 1 
        end 
    end 
    guiSetText(GUIEditor.memo[2], setText ) 
end 
  

.

I have tried outputting setText, it WORKS VERY FINE with outputChatBox but why isn't the text set.

I also tried setting it in gui.lua by calling function FROM client_handler.lua but it still din't work!

Edited by Guest
Posted
you must create font first using guiCreateFont

actually i dont want a font and according to wiki you dont need a font. It has worked many times before using fonts in other of my resources.

Posted

They are valid strings. I have taken them from SQLite database which have columns Rank TEXT and Players TEXT. I have tried to output it too, it worked. But not in guiSetText. There's no error either!!!!

Posted
Try defining (v.'Whatever') as another variable first then setting it
rtext = v.Whatever 

And have you tried out putting it server side, or client side?

what do you mean? have you even tried seeing the post? i have done that. setText!!!!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...