Strip Player Problem

Please post any questions about developing your plugin here. Please use the search function before posting!
decompile
Senior Member
Posts: 418
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Strip Player Problem

Postby decompile » Fri Jul 22, 2016 12:34 am

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
User avatar
L'In20Cible
Project Leader
Posts: 1536
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: Strip Player Problem

Postby L'In20Cible » Fri Jul 22, 2016 1:07 am

InputData.activator is no longer accepting an index, but a BaseEntity instance directly.

Syntax: Select all

entity.strip(activator=self)


See also: 5d6a395c108604fe040e65943d90c45019308e2d

Return to “Plugin Development Support”

Who is online

Users browsing this forum: Bing [Bot] and 52 guests