summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-09-24 22:33:39 +0200
committerAlexander Harkness <me@bearbin.net>2018-09-24 22:33:39 +0200
commit4727ed20846bb3d1a9eabb27aaaa9c5524129556 (patch)
treed6206a51db95a15fd3dfadb9691c868fc6bd8bd1 /src/Bindings/LuaState.cpp
parentAdd BurnsInDaylight to Lua API and Monsters.ini (#4295) (diff)
downloadcuberite-4727ed20846bb3d1a9eabb27aaaa9c5524129556.tar
cuberite-4727ed20846bb3d1a9eabb27aaaa9c5524129556.tar.gz
cuberite-4727ed20846bb3d1a9eabb27aaaa9c5524129556.tar.bz2
cuberite-4727ed20846bb3d1a9eabb27aaaa9c5524129556.tar.lz
cuberite-4727ed20846bb3d1a9eabb27aaaa9c5524129556.tar.xz
cuberite-4727ed20846bb3d1a9eabb27aaaa9c5524129556.tar.zst
cuberite-4727ed20846bb3d1a9eabb27aaaa9c5524129556.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaState.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 7ec099982..c1e71bd5c 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -2004,7 +2004,7 @@ void cLuaState::LogStackTrace(lua_State * a_LuaState, int a_StartingDepth)
-int cLuaState::ApiParamError(const char * a_MsgFormat, fmt::ArgList argp)
+int cLuaState::ApiParamError(fmt::StringRef a_Msg)
{
// Retrieve current function name
lua_Debug entry;
@@ -2012,8 +2012,7 @@ int cLuaState::ApiParamError(const char * a_MsgFormat, fmt::ArgList argp)
VERIFY(lua_getinfo(m_LuaState, "n", &entry));
// Compose the error message:
- AString msg = Printf(a_MsgFormat, argp);
- AString errorMsg = fmt::format("{0}: {1}", (entry.name != nullptr) ? entry.name : "<unknown function>", msg);
+ AString errorMsg = fmt::format("{0}: {1}", (entry.name != nullptr) ? entry.name : "<unknown function>", a_Msg);
// Log everything into the console:
LOGWARNING("%s", errorMsg.c_str());