Jump to content

Help here plz


Madonz

Recommended Posts

Posted (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 by Guest
Posted
  
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.

Posted

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 :D

Posted

Change the gui-memo to a gui-edit.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You're welcome.

Topic locked.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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