Garry's Mod Wiki

table.foreachi

  table.foreachi( table table, function func )

Description

We advise against using this. It may be changed or removed in a future update. This was deprecated in Lua 5.1 and removed in 5.2. You should use ipairs() instead.

Iterates for each numeric index in the table in order.

This is inherited from the original Lua implementation and is deprecated in Lua as of 5.1; see here. You should use ipairs() instead.

Arguments

1 table table
The table to iterate over.
2 function func
The function to run for each index.