Jump to content

عدم تكملة الفراغات ...


Recommended Posts

if ( string.len( element ) < 2 ) then 

كذا يتحقق انة الشيء اقل شيء يكون 2 ويسوي الوظيفة ! يعني الـ

element

حقك الايديت .. ميمو .. اي شيء تبية ! اقل شيء يكون فية شيئين ! حرفين اي شيء اهم شيء 2 ذذ

Link to comment
function Click() 
    if source == GUIEditor_Button[1] then 
  
         if ( string.len( element ) < 2 ) then 
outputChatBox ( "أنت لم تضع شيء ! " .. guiGetText ( dummyGUIElement ) ) 
        end 
  end 
addEventHandler("onClientGUIClick", root, Click) 

كذآ صح ؟

Link to comment

لم يتم التجربةة ..

function Click() 
    if source == GUIEditor_Button[1] then 
    local element = guiGetText( الايديت ) 
    if ( string.len( element ) < 2 ) then 
    outputChatBox ( "أنت لم تضع شيء ! "  ) 
    return 
             nil 
        end 
    end 
end 
addEventHandler("onClientGUIClick",root,Click) 
  

كلنت !

Link to comment

لا تستخدم :

nil 

جرب ذآ

addEventHandler( 'onClientGUIClick', guiRoot, 
    function( ) 
        if souurce == GUIEditor_Button[ 1 ] then  
            local text = guiGetText( الايديت); 
            if text:len( ) < 5 then  
                outputChatBox ( 'أنت لم تضع شيء !' ); 
                return 
            end 
        end 
    end 
); 

Link to comment
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if source == الزر then 
            local text = guiGetText ( الايديت ); 
            if text == "" or text == " " then 
                return outputChatBox ( "أنت لم تضع شيء !" ); 
            end 
        end 
    end 
); 

Link to comment

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...