MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / ExecuteScript

Method ExecuteScript

TombEngine/Scripting/Internal/LuaHandler.cpp:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void LuaHandler::ExecuteScript(const std::string& luaFilename, bool isOptional)
22{
23 if (isOptional && !std::filesystem::is_regular_file(luaFilename))
24 return;
25
26 auto result = _lua->safe_script_file(luaFilename, sol::script_pass_on_error);
27 if (!result.valid())
28 {
29 sol::error error = result;
30 throw TENScriptException{ error.what() };
31 }
32}
33
34void LuaHandler::ExecuteString(const std::string& command)
35{

Callers 2

ExecuteScriptFileMethod · 0.80
LoadFlowScriptMethod · 0.80

Calls 3

safe_script_fileMethod · 0.80
validMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected