
If a global Lua variable is not a function, it should not be called. Also cleaned up parts of the code and fixed a minor error reporting bug.
If a global Lua variable is not a function, it should not be called. Also cleaned up parts of the code and fixed a minor error reporting bug.