TheIceman1 Posted March 14, 2013 Share Posted March 14, 2013 Why this dont set clans on gridlist?No errors. function setclans () guiSetVisible ( GUIEditor_Window[4], true ) showCursor ( true ) for _, clan in ipairs ( getElementData ( localPlayer, "clan" ) ) do local rowc = guiGridListAddRow ( GUIEditor_Grid[4] ) local clant = getElementData ( clan, "type" ) guiGridListSetItemText ( GUIEditor_Grid[4], rowc, GUIEditor_Column[5], clan, false, false ) guiGridListSetItemText ( GUIEditor_Grid[4], rowc, GUIEditor_Column[6], clant, false, false ) end end addCommandHandler ( "clans", setclans ) Link to comment
Renkon Posted March 14, 2013 Share Posted March 14, 2013 So localPlayer elementData "clan" contains a string? If that's the case, obviously clan cannot hold elementData cause its a simple string, and not an element. It won't work by that way. Now, if you want, WHAT YOU SHOULD DO, is to attach to the elementData a table holding the data like this: table = { ["clan1"] = "deathmatch", ["clanPro"] = "race" } And if you are trying to show the TEAMS, you should get the teams from serverside and trigger them, or create a dummy element and add it as elementData so you can get the dummy element and it's element data. 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