scratcher911 Posted August 8, 2012 Posted August 8, 2012 testtable[group]["name"] = name I've made the table like testtable = {} Error: attempt to index field '?' (a nil value)
Castillo Posted August 8, 2012 Posted August 8, 2012 Show us what 'group' is. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
scratcher911 Posted August 8, 2012 Author Posted August 8, 2012 local group = getElementData(source, "WL") it should return number
Castillo Posted August 8, 2012 Posted August 8, 2012 Have you tried checking what: testtable[group] returns? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted August 8, 2012 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 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted August 8, 2012 Posted August 8, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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