Jump to content

gridList problem


SkatCh

Recommended Posts

hello community please can any one help me to fix this :

function addPlayersToGridlist() 
    if (not aColumn or isAdminBrowsing) then return end 
    guiGridListClear(aGrid1)     -- line 502 
    for index, players in pairs(getElementsByType("player")) do  
        local localTeam = getPlayerTeam(players) 
        if (localTeam) then 
            mainR, mainG, mainB = getTeamColor(localTeam) 
        else 
            mainR, mainG, mainB = 255, 255, 255 
        end 
        local row = guiGridListAddRow(aGrid1)  -- line 510 
        local name = getPlayerName(players) 
        guiGridListSetItemText(aGrid1, row, aColumn, name, false, false)  -- line 512 
        guiGridListSetItemColor(aGrid1, row, aColumn, mainR, mainG, mainB)  -- line 513 
        getPlayerRow[players] = row 
    end 
end 

warnings :

7502090fd8.jpg

Link to comment
Can't you see it? aGrid1 is nil... it's not defined, the gridlist wasn't created. Show us the code where you created it, it's possibly local variable.

i add it to local variable :

local aWindow, aTab,aButton, aEdit,aColumn, aLabel,aGrid1 = {}, {}, {}, {}, {}, {} , {}, {}, {} ,{} 

and now i got this warning in the same lines but :

[expected gui-element at argument 1 , got table ]

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