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

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
Mahi
Senior Member
Posts: 236
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

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

Postby Mahi » Sun Jan 11, 2015 10:22 pm

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?
User avatar
satoon101
Project Leader
Posts: 2703
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sun Jan 11, 2015 10:25 pm

It seems you used a float when you need to use an integer.
Image

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 66 guests