summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/LuaState.cpp')
-rw-r--r--src/Bindings/LuaState.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 0541af793..b7f5f17e0 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -1877,6 +1877,32 @@ bool cLuaState::CheckParamFunctionOrNil(int a_StartParam, int a_EndParam)
+bool cLuaState::CheckParamVector3(int a_StartParam, int a_EndParam)
+{
+ ASSERT(IsValid());
+
+ if (a_EndParam < 0)
+ {
+ a_EndParam = a_StartParam;
+ }
+
+ for (int i = a_StartParam; i <= a_EndParam; ++i)
+ {
+ if (IsParamVector3(a_StartParam))
+ {
+ continue;
+ }
+
+ ApiParamError("Failed to read parameter #%d. Vector3 expected, got %s", i, GetTypeText(i).c_str());
+ return false;
+ }
+ return true;
+}
+
+
+
+
+
bool cLuaState::CheckParamUUID(int a_StartParam, int a_EndParam)
{
ASSERT(IsValid());