guiGridListSetItemText(teamPlayersGrid, row, 1, player[index], false, false)
replace that line (247) with this one
of course this problem happen because player still a table and to access player namz you should put the table index
NearGreen code is correct just replace the line 31 with this
getPlayerRow[player] = row
dont forget to define the table outside the function
local getPlayerRow = {}