scratcher911 Posted August 8, 2012 Share Posted August 8, 2012 testtable[group]["name"] = name I've made the table like testtable = {} Error: attempt to index field '?' (a nil value) Link to comment
scratcher911 Posted August 8, 2012 Author Share Posted August 8, 2012 local group = getElementData(source, "WL") it should return number Link to comment
Castillo Posted August 8, 2012 Share Posted August 8, 2012 Have you tried checking what: testtable[group] returns? Link to comment
scratcher911 Posted August 8, 2012 Author Share Posted August 8, 2012 nope. I tryed and returns nil Link to comment
Castillo Posted August 8, 2012 Share Posted August 8, 2012 Which means your script will not work, as testtable[group] returns nil. You could do: if ( not testtable[group] ) then testtable[group] = { } end 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