Fix indentation of lua_api.txt
Add more error checking to l_register_ore