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/GameLogic/SCA_PropertySensor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/gameengine/GameLogic/SCA_PropertySensor.cpp') diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp index 164e94b6597..9ae7be16b12 100644 --- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp +++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp @@ -382,7 +382,7 @@ PyObject* SCA_PropertySensor::PySetType(PyObject* self, PyObject* args, PyObject ShowDeprecationWarning("setType()", "the type property"); int typeArg; - if (!PyArg_ParseTuple(args, "i", &typeArg)) { + if (!PyArg_ParseTuple(args, "i:setType", &typeArg)) { return NULL; } @@ -417,7 +417,7 @@ PyObject* SCA_PropertySensor::PySetProperty(PyObject* self, PyObject* args, PyOb /* on the fly? */ char *propNameArg = NULL; - if (!PyArg_ParseTuple(args, "s", &propNameArg)) { + if (!PyArg_ParseTuple(args, "s:setProperty", &propNameArg)) { return NULL; } @@ -455,7 +455,7 @@ PyObject* SCA_PropertySensor::PySetValue(PyObject* self, PyObject* args, PyObjec /* We know that the property exists, or is NULL. */ char *propValArg = NULL; - if(!PyArg_ParseTuple(args, "s", &propValArg)) { + if(!PyArg_ParseTuple(args, "s:setValue", &propValArg)) { return NULL; } STR_String oldval = m_checkpropval; -- cgit v1.2.3