Jump to content

مششكلة


Recommended Posts

السلام عليكم

عندي مشكلة بذا الكود

        addEventHandler ( "onClientGUIChanged", resourceRoot, function ( ) 
    if ( source == GUIEditor.edit[1] ) then 
        guiGridListClear ( playerList ) 
         local row = guiGridListAddRow ( playerList ) 
         local cl = guiGridListAddcolumn(playerList, "Players List", 0.9) 
        local text = guiGetText ( source ) 
        if ( text == "" ) then 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
            guiGridListSetItemText(playerList, row, cl, getPlayerName(name), false, false) 
                guiGridListSetItemPlayerName ( playerList, guiGridListAddRow ( playerList ), 1, getPlayerName ( player ), false, false ) 
            end 
        else 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
                if ( string.find ( string.upper ( getPlayerName ( player ) ), string.upper ( text ), 1, true ) ) then 
                guiGridListSetItemText ( playerList, row, cl, getPlayerName ( player ), false, false ) 
                    guiGridListSetItemPlayerName ( playerList, guiGridListAddRow ( playerList ), 1, getPlayerName ( player ), false, false ) 
                end 
            end 
        end 
    end 
end 

Debugscript

ERROR: Loadin Script failed: script\client.lua:76: ')' expected (to close '(' at line 50) near 'function'

Link to comment
  
        addEventHandler ( "onClientGUIChanged", root, function ( ) 
    if ( source == GUIEditor.edit[1] ) then 
        guiGridListClear ( playerList ) 
         local row = guiGridListAddRow ( playerList ) 
         local cl = guiGridListAddcolumn(playerList, "Players List", 0.9) 
        local text = guiGetText ( source ) 
        if ( text == "" ) then 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
            guiGridListSetItemText(playerList, row, cl, getPlayerName(name), false, false) 
                guiGridListSetItemPlayerName ( playerList, guiGridListAddRow ( playerList ), 1, getPlayerName ( player ), false, false ) 
            end 
        else 
            for id, player in ipairs ( getElementsByType ( "player" ) ) do 
                if ( string.find ( string.upper ( getPlayerName ( player ) ), string.upper ( text ), 1, true ) ) then 
                guiGridListSetItemText ( playerList, row, cl, getPlayerName ( player ), false, false ) 
                    guiGridListSetItemPlayerName ( playerList, guiGridListAddRow ( playerList ), 1, getPlayerName ( player ), false, false ) 
                end 
            end 
        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...