Loads a Lua chunk. If there are no errors, lua_load pushes the compiled chunk as a Lua function on top of the stack. Otherwise, it pushes an error message.
0: no errors. LUA_ERRSYNTAX: syntax error during pre-compilation. LUA_ERRMEM: memory allocation error.
This function only loads a chunk; it does not run it. lua_load automatically detects whether the chunk is text or binary, and loads it accordingly (see program luac). lua_load uses a user-supplied reader function to read the chunk (see lua_Reader).