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

Method ExecuteString

TombEngine/Scripting/Internal/LuaHandler.cpp:34–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void LuaHandler::ExecuteString(const std::string& command)
35{
36 auto result = _lua->safe_script(command, sol::environment(_lua->lua_state(), sol::create, _lua->globals()), sol::script_pass_on_error);
37 if (!result.valid())
38 {
39 sol::error error = result;
40 throw TENScriptException{ error.what() };
41 }
42}

Callers 1

InitializeEventListFunction · 0.45

Calls 5

safe_scriptMethod · 0.80
globalsMethod · 0.80
lua_stateMethod · 0.45
validMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected