Improve handling of errors in lua functions and speed up calls. (#1427)

This commit is contained in:
Kyzentun
2017-04-04 11:36:23 -07:00
committed by Colby Klein
parent 86dbab0100
commit f10e3ae36a
21 changed files with 38 additions and 86 deletions
+2 -4
View File
@@ -1060,8 +1060,7 @@ void Profile::LoadCustomFunction( RString sDir )
LuaHelpers::Push(L, sDir);
// Run it
RString Error= "Error running CustomLoadFunction: ";
LuaHelpers::RunScriptOnStack(L, Error, 2, 0, true);
LuaHelpers::RunScriptOnStack(L, 2, 0);
LUA->Release(L);
}
@@ -1344,8 +1343,7 @@ bool Profile::SaveAllToDir( RString sDir, bool bSignData ) const
LuaHelpers::Push(L, sDir);
// Run it
RString Error= "Error running CustomSaveFunction: ";
LuaHelpers::RunScriptOnStack(L, Error, 2, 0, true);
LuaHelpers::RunScriptOnStack(L, 2, 0);
LUA->Release(L);