Madonz Posted February 7, 2012 Posted February 7, 2012 (edited) Hello,i am new here and i am learning some of lua code.Today i got a question and i guess u'll can solve it,the point is that i want get text from my gui,i used memo and editBox this is what i do: function okGUI(button,state) if button == "left" and state == "up" then if (source == ok) then local text = guiGetText ( memo ) outputChatBox ( text ) if (text) == "bla" then outputChatBox("BLABLABLA",255,0,0) end end end end Then i try with bla and nothing can someone tell me how to do it?i am sure theres an error AHH i forgot ,dunno why, but i cant write on my editBox Edited February 7, 2012 by Guest
GanJaRuleZ Posted February 7, 2012 Posted February 7, 2012 function okGUI(button,state) if button == "left" and state == "up" then if (source == ok) then local text = guiGetText ( memo ) outputChatBox ( text ) if (text == "stats") then end end end end Next time try /debugscript 3 My Projects! No one.
Madonz Posted February 7, 2012 Author Posted February 7, 2012 And still not working function okGUI(button,state) if button == "left" and state == "up" then if (source == ok) then local text = guiGetText ( memo ) outputChatBox ( text ) if (text == "stats") then outputChatBox("BLABLA",255,0,0); end end end end when i type stats just appear stats that s the line up to it,understand me i am begginer and i dunno much things.Dont get angry if i didnt understand u or something plz
Castillo Posted February 7, 2012 Posted February 7, 2012 Change the gui-memo to a gui-edit. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Madonz Posted February 7, 2012 Author Posted February 7, 2012 But dunno why i cant write in the gui-edit
Castillo Posted February 7, 2012 Posted February 7, 2012 You have two posts, one is on the Spanish section, and it worked for me, why don't you use it? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Madonz Posted February 7, 2012 Author Posted February 7, 2012 Ye,it worked thx man for all the help,can close this and other post thx!!!
Castillo Posted February 7, 2012 Posted February 7, 2012 You're welcome. Topic locked. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts