lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Apr 15, 2013 at 1:55 PM, Philipp Janda <> wrote:
set of available functions changes, when the developers have found another way how to write bots. It's better to find that out when loading the game and not when you are in the middle of a group of monsters.

Good advice for life, not just game programming!

I suspect there are lots of restricted Lua environments, where debug is not available, or the io/os modules are missing (setfenv/getfenv are likely candidates as well). One might configure a static analysis tool for the most common cases, but covering all of them is difficult.

I handle this in lglob by -wx which is given an 'exclusive' whitelist, containing known globals:


For restricted environments, a blacklist might make more sense, however, since they are often best defined by what's removed.

Also setfenv/_ENV might complicate the matter for a static tool.

Oh it does. I decided simply not to support the more odd uses ;)