WhoAmI Posted April 7, 2015 Posted April 7, 2015 loggedAccounts[id]["username"] = username; loggedAccounts[id]["token"] = token; loggedAccounts[id]["email"] = a[1]["email"]; loggedAccounts[id]["serial"] = a[1]["serial"]; loggedAccounts[id]["ip"] = a[1]["ip"]; loggedAccounts[id]["activated"] = a[1]["activated"]; Am I doing something wrong? All values returns correct things. Error is: attempt to index field '?' (a nil value ) on line loggedAccounts[id]["username"] = username; As I said, everything return correct values and table 'loggedAccounts' exist.
Addlibs Posted April 7, 2015 Posted April 7, 2015 Are you sure that loggedAccounts and loggedAccounts[id] are both table values? You can't index loggedAccounts[id] if it's not a table. Try adding loggedAccounts[id] = {} before the first line
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