Table exists? but bad argument #1 to 'insert' (table expected, got nil)
1 replies, posted
Hello, got error today.
bad argument #1 to 'insert' (table expected, got nil)
local CHANGED = CHANGED
CHANGED.someName = CHANGED.someName or {}
...
table.insert(CHANGED.someName, {Min, Max})
I have no idea why it comes as nil
Any help appreciated!
Ughhh forgot about Problems That Don't Need Their Own Thread v2.0, Sorry for that
If you're doing something = something || { } then it needs to be global ( for auto-refresh; otherwise the variable is local to the scope of the file, and when the file is refreshed the local gets reset because it redefines it )..
Sorry, you need to Log In to post a reply to this thread.