diff --git a/src/c/Mex/MexTypes.h b/src/c/Mex/MexTypes.h
index ec0e7ee6c0c9bc0c4bba3c404e76079da26f67cf..5303ea058ade64fabd394ee16c3dab6578305d9a 100644
--- a/src/c/Mex/MexTypes.h
+++ b/src/c/Mex/MexTypes.h
@@ -36,6 +36,12 @@ namespace Script
 		mexPrintf(fmt, std::forward<Args>(args)...);
 	}
 
+	template <typename... Args>
+	inline void warnMsg(const char* fmt, Args&&... args)
+	{
+		mexWarnMsgTxt(formatMsg(fmt, std::forward<Args>(args)...).c_str());
+	}
+
 	template <typename... Args>
 	inline void errorMsg(const char* fmt, Args&&... args)
 	{
diff --git a/src/c/Python/PyTypes.h b/src/c/Python/PyTypes.h
index b186a91071a1beb48d33f2a8daec4784740357dd..51156c0353d983ed580e41690e4ac0371e65ec40 100644
--- a/src/c/Python/PyTypes.h
+++ b/src/c/Python/PyTypes.h
@@ -39,6 +39,12 @@ namespace Script
 		PySys_WriteStdout(fmt, std::forward<Args>(args)...);
 	}
 
+	template <typename... Args>
+	inline void warnMsg(const char* fmt, Args&&... args)
+	{
+		PyErr_WarnFormat(nullptr, 2, fmt, std::forward<Args>(args)...);
+	}
+
 	template <typename... Args>
 	inline void errorMsg(const char* fmt, Args&&... args)
 	{