Page 1 of 1

player.health += health raises Boost.Python.ArgumentError

Posted: Sun Jan 11, 2015 10:22 pm
by Mahi

Code: Select all

  File '..\addons\source-python\plugins\mymod\stuff\default_stuff.py', line
 37, in on_attack
    player.health += hp
  File '..\addons\source-python\packages\source-python\entities\entity.py', line
 208, in __setattr__
    self._set_property(attr, value)
  File '..\addons\source-python\packages\source-python\entities\entity.py', line
 256, in _set_property
    getattr(self.edict, 'set_prop_{0}'.format(prop.type))(prop.prop, value)

Boost.Python.ArgumentError: Python argument types in
    Edict.set_prop_int(Edict, str, float)
did not match C++ signature:
    set_prop_int(struct edict_t *, char const * prop_name, int value)

Any ideas at all? Is this my fault or Source.Python sided problem?

Posted: Sun Jan 11, 2015 10:25 pm
by satoon101
It seems you used a float when you need to use an integer.