I get that this is a really old post, but I hit the same error. I was able to resolve it by building and installing lua 5.3.4 from source. The '#' and '%' were introduced in Lua 5.1: "Lua 5.1 was released on 21 Feb 2006. Its main new features were a new module system, incremental garbage collec...