#Table not traversing table correctly

1 messages · Page 1 of 1 (latest)

vapid jacinth
#

This is the table and the value I am putting in there

table.insert(self.ActiveMessages, 1, { Label = label, Time = 0, Duration = duration, Static = static })

Then this is the for loop that isn't traversing the table, it is stopping at the first value despite #self.ActiveMessages returning the correct amount.

for i = #self.ActiveMessages, 1, -1 do
    local msg = table.remove(self.ActiveMessages, i)
    msg.Label:Destroy()
    break
end
hallow lintel
#

Hey.

#

Im going to DM you.

vapid jacinth
#

i am traversing backwards beause the first time I traversed foward it didn't work

#

k

#

This still isn't fixed please help

#

wait

#

I'm an idiot, theres a break, I was copying from another code snippet thats similar lol