Page 1 of 1

Strip Player Problem

Posted: Fri Jul 22, 2016 12:34 am
by decompile
Hey,

Recently im getting a weird exception when trying to strip players on their spawn.

Syntax: Select all

def strip(self):
entity = Entity.create('player_weaponstrip')
entity.strip(activator=self.index)
entity.remove()


Code: Select all

  File '..\addons\source-python\plugins\plugin\plugin.py', line 241, in strip
    entity.strip(activator=self.index)
  File '..\addons\source-python\packages\source-python\entities\datamaps.py', line 158, in __call__
    inputdata.activator = activator

TypeError: No registered converter was able to extract a C++ pointer to type class CBaseEntityWrapper from this Python object of type int

Re: Strip Player Problem

Posted: Fri Jul 22, 2016 1:07 am
by L'In20Cible
InputData.activator is no longer accepting an index, but a BaseEntity instance directly.

Syntax: Select all

entity.strip(activator=self)


See also: 5d6a395c108604fe040e65943d90c45019308e2d