Apparently luaL_error does not return. Return boolean and string instead.
Use BSD style, it's easier to read. Also switch to tabs.