- Added support for calling Lua functions with !PluginBang
- Removed old (undocumented) implementation for handling mouse actions
- Lua errors now contain the script file name only (instead of full path)
This commit is contained in:
Birunthan Mohanathas
2011-07-07 16:18:39 +00:00
parent 9bc238f9f2
commit b99b275f44
7 changed files with 39 additions and 107 deletions

View File

@ -64,8 +64,7 @@ LuaScript::LuaScript(lua_State* state, const char* file) : m_State(state),
if (result)
{
m_Initialized = false;
LuaManager::LuaLog(LOG_ERROR, "Script: Could not run file: %s", lua_tostring(m_State, -1));
lua_pop(m_State, 1);
LuaManager::ReportErrors(m_State);
luaL_unref(m_State, LUA_GLOBALSINDEX, m_iRef);
m_iRef = LUA_NOREF;
@ -74,8 +73,7 @@ LuaScript::LuaScript(lua_State* state, const char* file) : m_State(state),
else
{
m_Initialized = false;
LuaManager::LuaLog(LOG_ERROR, "Script: Could not run file: %s", lua_tostring(m_State, -1));
lua_pop(m_State, 1);
LuaManager::ReportErrors(m_State);
}
}