Ok, so just to be clear: I’m new to programming. Please help me if possible! :)
Why is my code not working? I’m trying to remove a randomly selected element from my table. However, when I run the code, I get something like: “attempt to call field ‘remove’ (a nil value)”.
I’m not sure what is wrong with the code - I think it’s something about the arguments I passed to table.remove().
table = {1, 2, 3, 4, 5, 6, 7, 8, 9} number1 = table[math.random(#table)] table.remove(#table, number1) print(table)
Thanks!
