Fury Posted December 23, 2012 Share Posted December 23, 2012 function clanTeamListFunc(source) local rowdata = {} local inumber = 0 for i, v in pairs(getAccounts()) do inumber = inumber + 1 rowdata[inumber] = { team = getAccountData(v, "team") or "Empty" } end if (inumber ~= 0) then table.sort ( rowdata, function ( a, b ) return ( a.team or 0 ) < ( b.team or 0 ) end ) return rowdata end end hey guys i have this code. but i have a problem. it gets every "team" data on every player. i wanna get just only not empty data's. can you help me please? Link to comment
Fury Posted December 23, 2012 Author Share Posted December 23, 2012 function clanTeamListFunc(source) local rowdata = {} local inumber = 0 for i, v in pairs(getAccounts()) do inumber = inumber + 1 local tName = getAccountData(v,'team') if tName then rowdata[inumber] = { team = tName } end end if (inumber ~= 0) then table.sort ( rowdata, function ( a, b ) return ( a.team or 0 ) < ( b.team or 0 ) end ) return rowdata end end karthik_184 solve the problem. thank you dude 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