Original Post
I'm not a lua pro, but I can't find any specific references about lua tables that covers this question so I'll ask here. I realize it's valid to remove a value from a lua table by setting it to nil, but it seems potentially unsafe to do it within a for loop like this. Does anyone know for sure, and/or could anyone provide references that say one way or the other? Thanks.
for key, actor in actorlist do
if actor.timeToDelete < gameTime then
actorlist[key] = nil
end
end