Storm-Hanma Posted July 24, 2018 Share Posted July 24, 2018 (edited) hello all im trying to make this script work but im getting error ------client function top(data) for i,theKey in pairs(data) do local row = guiGridListAddRow(top10gridlist) guiGridListSetItemText(top10gridlist, row, top10column1, theKey[i][1], false, false ) guiGridListSetItemText(top10gridlist, row, top10column2, theKey[i][2], false, false ) guiGridListSetItemText(top10gridlist, row, top10column3, theKey[i][3], false, false ) end end errors : attempt to index field'?'[a number value] at line 5 guigridlistsetitemtext ... whats the reason? Edited July 24, 2018 by KINGKHAN Link to comment
Addlibs Posted July 24, 2018 Share Posted July 24, 2018 (edited) theKey == data[i] theKey[i] == data[i][i] I believe you wanted to use theKey[1], theKey[2], theKey[3] rather than theKey[i][1], theKey[i][2], theKey[i][3] Edited July 24, 2018 by MrTasty 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