TableRemove return value January 10, 2018 10:48AM |
Registered: 6 years ago Posts: 783 |
Quote
table.remove (table [, pos])
Removes from table the element at position pos, shifting down other elements to close the space, if necessary. Returns the value of the removed element. The default value for pos is n, where n is the length of the table, so that a call table.remove(t) removes the last element of table t.
Re: TableRemove return value January 10, 2018 05:06PM |
Admin Registered: 8 years ago Posts: 798 |
Re: TableRemove return value January 10, 2018 05:34PM |
Registered: 6 years ago Posts: 783 |
local item = queue[#queue] TableRemove(queue)to avoid some nil reference error instead of
local item = TableRemove(queue)But now it works with a single line as it should. And this happened twice with different code ::o