Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-05-26 11:41:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-05-26 11:41:34 +0400
commit7ba91ddcc37bbc8cd6c417e588d7ca7a3bb65e24 (patch)
treea48e47d95c8ebf987ff561ddc38d3542d5a35e37 /source/gameengine/Ketsji/KX_GameObject.cpp
parent5f82855a07eb1cfbb89aba654c9c8f7da1544c5b (diff)
BGE Script template for a python module (set EOL to native this time)
BGE PyAPI use defines for error return values - del gameOb['var'] error message was wrong.
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index f1c3fb89df2..1f7eeca1b69 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -1342,7 +1342,7 @@ int KX_GameObject::Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
if (del==0) {
if(attr_str) PyErr_Format(PyExc_KeyError, "gameOb[key] = value: KX_GameObject, key \"%s\" could not be set", attr_str);
- else PyErr_SetString(PyExc_KeyError, "gameOb[key] = value: KX_GameObject, key could not be set");
+ else PyErr_SetString(PyExc_KeyError, "del gameOb[key]: KX_GameObject, key could not be deleted");
return -1;
}
else if (self->m_attr_dict) {
@@ -1902,13 +1902,13 @@ int KX_GameObject::py_delattro(PyObject *attr)
char *attr_str= PyString_AsString(attr);
if (RemoveProperty(attr_str)) // XXX - should call CValues instead but its only 2 lines here
- return 0;
+ return PY_SET_ATTR_SUCCESS;
if (m_attr_dict && (PyDict_DelItem(m_attr_dict, attr) == 0))
- return 0;
+ return PY_SET_ATTR_SUCCESS;
PyErr_Format(PyExc_AttributeError, "del gameOb.myAttr: KX_GameObject, attribute \"%s\" dosnt exist", attr_str);
- return 1;
+ return PY_SET_ATTR_MISSING;
}