Hi,
Loop functions can't be coded in Lua (yet). They must be done in C++.
Wrapping all of ARGoS in Lua is a huge amount of work, and would kill performance sensibly. I'm studying solutions to avoid these problems, but for the time being C++ is the way.
Cheers,
Carlo