Jump to content

Gridlist


Recommended Posts

Hello guys can somebody see what's wrong here? I'm trying to fill the gridlist with teams, no errors in debug
GUIEditor.gridlist[2] = guiCreateGridList(12, 27, 142, 174, false, GUIEditor.window[2]) 
local columns = guiGridListAddColumn(GUIEditor.gridlist[2], "Teams", 0.9) 
if ( columns ) then --If the column has been created, fill it with teams 
    for _,t in ipairs(getElementsByType("team"))do 
        local row = guiGridListAddRow(GUIEditor.gridlist[2]) 
        local teamName = getTeamName(t) 
        guiGridListSetItemText(GUIEditor.gridlist[2],row,column,teamName,false,false) 
    end 
end 

try this ;

GUIEditor.gridlist[2] = guiCreateGridList(12, 27, 142, 174, false, GUIEditor.window[2]) 
local columns = guiGridListAddColumn(GUIEditor.gridlist[2], "Teams", 0.9) 
    for _,t in ipairs(getElementsByType("team"))do 
      guiGridListSetItemText(GUIEditor.gridlist[2],guiGridListAddRow(GUIEditor.gridlist[2]),1,getTeamName(t),false,false) 
   end 
  

*if not work copy all your code

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