summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings.h
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/ManualBindings.h
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 'src/Bindings/ManualBindings.h')
-rw-r--r--src/Bindings/ManualBindings.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Bindings/ManualBindings.h b/src/Bindings/ManualBindings.h
index fb19d5a61..42e34eda2 100644
--- a/src/Bindings/ManualBindings.h
+++ b/src/Bindings/ManualBindings.h
@@ -288,17 +288,17 @@ public:
L.GetStackValues(1, Self, BlockX, BlockY, BlockZ, FnRef);
if (Self == nullptr)
{
- return lua_do_error(tolua_S, "Error in function call '#funcname#': Invalid 'self'");
+ return L.ApiParamError("Invalid 'self'");
}
if (!FnRef.IsValid())
{
- return lua_do_error(tolua_S, "Error in function call '#funcname#': Expected a valid callback function for parameter #5");
+ return L.ApiParamError("Expected a valid callback function for parameter #5");
}
if (!(Self->*CoordCheckFn)(BlockX, BlockY, BlockZ))
{
- return lua_do_error(tolua_S, Printf("Error in function call '#funcname#': The provided coordinates ({%d, %d, %d}) are not valid",
- BlockX, BlockY, BlockZ
- ).c_str());
+ return L.FApiParamError("The provided coordinates ({0}) are not valid",
+ Vector3i{BlockX, BlockY, BlockZ}
+ );
}
// Call the DoWith function: