Since a recent update the script editor has been underlining code like this
table.insert(alerts, #alerts + 1, alert)
in red. It still works, but it is acting like it shouldn’t by underlining it. Is it being deprecated or something?
Since a recent update the script editor has been underlining code like this
table.insert(alerts, #alerts + 1, alert)
in red. It still works, but it is acting like it shouldn’t by underlining it. Is it being deprecated or something?
It’s simply due to the second argument being not that useful.
table.insert(alerts, alert)
Will behave the same way
(also because of efficiency, since getting the length of the table makes it slower)
So if you leave the number position out of a table.insert
it automatically adds it to the table like this #table + 1
?