iPrestege Posted December 29, 2012 Share Posted December 29, 2012 Hello (= how are you today ? i came here becuse i have a problem with this code idont know what is it i want to use guisetText My Code : function onClick() if source == GUIEditor_Button[21] then if guiGetText ( GUIEditor_Button[21]] ) ~= "français" then guiSetText(GUIEditor_Button[1],"Ecrivez ici") guiSetText(GUIEditor_Button[2],"Ecrivez ici") guiSetText(GUIEditor_Button[3],"Ecrivez ici") guiSetText(GUIEditor_Button[4],"Ecrivez ici") guiSetText(GUIEditor_Button[5],"Ecrivez ici") guiSetText(GUIEditor_Button[6],"Ecrivez ici") guiSetText(GUIEditor_Button[7],"Ecrivez ici") guiSetText(GUIEditor_Button[8],"Ecrivez ici") guiSetText(GUIEditor_Button[9],"Ecrivez ici") guiSetText(GUIEditor_Button[10],"Ecrivez ici") guiSetText(GUIEditor_Button[11],"Ecrivez ici") guiSetText(GUIEditor_Button[12],"Ecrivez ici") guiSetText(GUIEditor_Button[13],"Ecrivez ici") guiSetText(GUIEditor_Button[14],"Ecrivez ici") guiSetText(GUIEditor_Button[15],"Ecrivez ici") guiSetText(GUIEditor_Button[16],"Ecrivez ici") guiSetText(GUIEditor_Button[17],"Ecrivez ici") guiSetText(GUIEditor_Button[18],"Ecrivez ici") guiSetText(GUIEditor_Button[19],"Ecrivez ici") guiSetText(GUIEditor_Button[20],"Ecrivez ici") elseif guiGetText ( GUIEditor_Button[22]] ) ~= "Deutsch" then guiSetText(GUIEditor_Button[1],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[2],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[3],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[4],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[5],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[6],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[7],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[8],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[9],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[10],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[11],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[12],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[13],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[14],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[15],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[16],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[17],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[18],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[19],"Was ist hier erforderlich") end end addEventHandler("onClientGUIClick",root,onClick) Link to comment
manve1 Posted December 29, 2012 Share Posted December 29, 2012 You are missing an 'end' Link to comment
iPrestege Posted December 29, 2012 Author Share Posted December 29, 2012 You are missing an 'end' but the debugscript say you have an extra end i will try and come back .. === # Up Date / Doesn,t Work DebugScript Say : Loading Sctript failed Panel/client.lua:470: "end" expected to close if at line 425 near <'eof'> Link to comment
manve1 Posted December 29, 2012 Share Posted December 29, 2012 addEventHandler('onClientGUIClick', getRootElement(), function( ) if source == GUIEditor_Button[21] then if guiGetText ( GUIEditor_Button[21]] ) ~= "français" then guiSetText(GUIEditor_Button[1],"Ecrivez ici") guiSetText(GUIEditor_Button[2],"Ecrivez ici") guiSetText(GUIEditor_Button[3],"Ecrivez ici") guiSetText(GUIEditor_Button[4],"Ecrivez ici") guiSetText(GUIEditor_Button[5],"Ecrivez ici") guiSetText(GUIEditor_Button[6],"Ecrivez ici") guiSetText(GUIEditor_Button[7],"Ecrivez ici") guiSetText(GUIEditor_Button[8],"Ecrivez ici") guiSetText(GUIEditor_Button[9],"Ecrivez ici") guiSetText(GUIEditor_Button[10],"Ecrivez ici") guiSetText(GUIEditor_Button[11],"Ecrivez ici") guiSetText(GUIEditor_Button[12],"Ecrivez ici") guiSetText(GUIEditor_Button[13],"Ecrivez ici") guiSetText(GUIEditor_Button[14],"Ecrivez ici") guiSetText(GUIEditor_Button[15],"Ecrivez ici") guiSetText(GUIEditor_Button[16],"Ecrivez ici") guiSetText(GUIEditor_Button[17],"Ecrivez ici") guiSetText(GUIEditor_Button[18],"Ecrivez ici") guiSetText(GUIEditor_Button[19],"Ecrivez ici") guiSetText(GUIEditor_Button[20],"Ecrivez ici") elseif guiGetText ( GUIEditor_Button[22]] ) ~= "Deutsch" then guiSetText(GUIEditor_Button[1],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[2],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[3],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[4],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[5],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[6],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[7],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[8],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[9],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[10],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[11],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[12],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[13],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[14],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[15],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[16],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[17],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[18],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[19],"Was ist hier erforderlich") end end end ) Not sure if will work, but try this. Link to comment
iPrestege Posted December 29, 2012 Author Share Posted December 29, 2012 addEventHandler('onClientGUIClick', getRootElement(), function( ) if source == GUIEditor_Button[21] then if guiGetText ( GUIEditor_Button[21]] ) ~= "français" then guiSetText(GUIEditor_Button[1],"Ecrivez ici") guiSetText(GUIEditor_Button[2],"Ecrivez ici") guiSetText(GUIEditor_Button[3],"Ecrivez ici") guiSetText(GUIEditor_Button[4],"Ecrivez ici") guiSetText(GUIEditor_Button[5],"Ecrivez ici") guiSetText(GUIEditor_Button[6],"Ecrivez ici") guiSetText(GUIEditor_Button[7],"Ecrivez ici") guiSetText(GUIEditor_Button[8],"Ecrivez ici") guiSetText(GUIEditor_Button[9],"Ecrivez ici") guiSetText(GUIEditor_Button[10],"Ecrivez ici") guiSetText(GUIEditor_Button[11],"Ecrivez ici") guiSetText(GUIEditor_Button[12],"Ecrivez ici") guiSetText(GUIEditor_Button[13],"Ecrivez ici") guiSetText(GUIEditor_Button[14],"Ecrivez ici") guiSetText(GUIEditor_Button[15],"Ecrivez ici") guiSetText(GUIEditor_Button[16],"Ecrivez ici") guiSetText(GUIEditor_Button[17],"Ecrivez ici") guiSetText(GUIEditor_Button[18],"Ecrivez ici") guiSetText(GUIEditor_Button[19],"Ecrivez ici") guiSetText(GUIEditor_Button[20],"Ecrivez ici") elseif guiGetText ( GUIEditor_Button[22]] ) ~= "Deutsch" then guiSetText(GUIEditor_Button[1],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[2],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[3],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[4],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[5],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[6],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[7],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[8],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[9],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[10],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[11],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[12],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[13],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[14],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[15],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[16],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[17],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[18],"Was ist hier erforderlich") guiSetText(GUIEditor_Button[19],"Was ist hier erforderlich") end end end ) Not sure if will work, but try this. does not Work ! Link to comment
iPrestege Posted December 29, 2012 Author Share Posted December 29, 2012 any error? Debugscript 3 / warning : loading script failed panel/client.lua 426: ')' expected near ']' Line 426 if guiGetText ( GUIEditor_Button[21]] ) ~= "français" then Link to comment
Vision Posted December 29, 2012 Share Posted December 29, 2012 if guiGetText ( GUIEditor_Button[21] ) ~= "français" then You added an extra ']' Link to comment
iPrestege Posted December 29, 2012 Author Share Posted December 29, 2012 if guiGetText ( GUIEditor_Button[21] ) ~= "français" then You added an extra ']' thanks it works ! Link to comment
SpUnKyMe Posted December 29, 2012 Share Posted December 29, 2012 addEventHandler('onClientGUIClick', root, function() if source == GUIEditor_Button[21] then if guiGetText ( GUIEditor_Button[21] ) ~= "français" then local i = 1 while i ~= 20 do guiSetText(GUIEditor_Button[i],"Ecrivez ici") i = i + 1 end elseif guiGetText ( GUIEditor_Button[22] ) ~= "Deutsch" then local i = 1 while i ~= 19 do guiSetText(GUIEditor_Button[i],"Was ist hier erforderlich") i = i + 1 end end end end) a bit late 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