Make ExecuteFunction print a better error message with the name of the function.

This commit is contained in:
hispidence 2021-08-23 22:07:18 +01:00
parent f5f46966fc
commit 85d37a3594

View file

@ -623,7 +623,7 @@ void GameScript::ExecuteFunction(std::string const & name)
if (!r.valid())
{
sol::error err = r;
ScriptAssert(false, err.what(), ERROR_MODE::TERMINATE);
ScriptAssertF(false, "Could not execute function {}: {}", name, err.what());
}
}