From 2fff90bbb4a922f454c15dbf2d6215bd4d8c519c Mon Sep 17 00:00:00 2001 From: Andre Susano Pinto Date: Fri, 10 Apr 2009 16:45:19 +0000 Subject: Added function name to many of the PyArg_ParseTuple calls in gameengine This way python raises more useful messages. --- source/gameengine/Ketsji/KX_CameraActuator.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/gameengine/Ketsji/KX_CameraActuator.cpp') diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index 4db24a6e365..0118e490773 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -440,7 +440,7 @@ PyObject* KX_CameraActuator::PyGetObject(PyObject* self, PyObject* args) ShowDeprecationWarning("getObject()", "the object property"); - if (!PyArg_ParseTuple(args, "|i", &ret_name_only)) + if (!PyArg_ParseTuple(args, "|i:getObject", &ret_name_only)) return NULL; if (!m_ob) @@ -496,7 +496,7 @@ PyObject* KX_CameraActuator::PySetMin(PyObject* self, { ShowDeprecationWarning("setMin()", "the min property"); float min; - if(PyArg_ParseTuple(args,"f", &min)) + if(PyArg_ParseTuple(args,"f:setMin", &min)) { m_minHeight = min; Py_RETURN_NONE; @@ -524,7 +524,7 @@ PyObject* KX_CameraActuator::PySetMax(PyObject* self, { ShowDeprecationWarning("getMax()", "the max property"); float max; - if(PyArg_ParseTuple(args,"f", &max)) + if(PyArg_ParseTuple(args,"f:setMax", &max)) { m_maxHeight = max; Py_RETURN_NONE; @@ -552,7 +552,7 @@ PyObject* KX_CameraActuator::PySetHeight(PyObject* self, { ShowDeprecationWarning("getHeight()", "the height property"); float height; - if(PyArg_ParseTuple(args,"f", &height)) + if(PyArg_ParseTuple(args,"f:setHeight", &height)) { m_height = height; Py_RETURN_NONE; @@ -570,7 +570,7 @@ PyObject* KX_CameraActuator::PySetXY(PyObject* self, { ShowDeprecationWarning("setXY()", "the xy property"); int value; - if(PyArg_ParseTuple(args,"i", &value)) + if(PyArg_ParseTuple(args,"i:setXY", &value)) { m_x = value != 0; Py_RETURN_NONE; -- cgit v1.2.3