Anubhav Posted March 17, 2016 Share Posted March 17, 2016 (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 March 18, 2016 by Guest Link to comment
stevensalvaro Posted March 17, 2016 Share Posted March 17, 2016 you must create font first using guiCreateFont Link to comment
Anubhav Posted March 17, 2016 Author Share Posted March 17, 2016 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. Link to comment
pro-mos Posted March 17, 2016 Share Posted March 17, 2016 Are v.Rank and v.Player valid strings? if not, use tostring() Link to comment
Anubhav Posted March 17, 2016 Author Share Posted March 17, 2016 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!!!! Link to comment
Captain Cody Posted March 17, 2016 Share Posted March 17, 2016 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? Link to comment
Anubhav Posted March 18, 2016 Author Share Posted March 18, 2016 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!!!! Link to comment
Anubhav Posted March 18, 2016 Author Share Posted March 18, 2016 Solved. Somehow it started working! thanks everyone Link to comment
Captain Cody Posted March 18, 2016 Share Posted March 18, 2016 Well I what I meant was assigning it separate from the setText, then combing it in. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now