[HL2:DM] effects

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

[HL2:DM] effects

Postby Painkiller » Sat Mar 30, 2019 8:15 pm

Another error message from a plugin

Code: Select all

2019-03-30 16:08:29 - sp   -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/packages/source-python/events/listener.py", line 92, in fire_game_event
    callback(game_event)
  File "../addons/source-python/plugins/supermod/supermod.py", line 337, in player_death
    event_player_death(game_event)
  File "../addons/source-python/plugins/supermod/supermod.py", line 421, in event_player_death
    effects.death_effect(victim, attacker, weapon)
  File "../addons/source-python/plugins/supermod/modules/effects.py", line 348, in death_effect
    point_hurt(victim, 5, 6)
  File "../addons/source-python/plugins/supermod/modules/effects.py", line 285, in point_hurt
    entity = Entity().create('point_hurt')

TypeError: __init__() missing 1 required positional argument: 'index'
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: [HL2:DM] effects

Postby satoon101 » Sun Mar 31, 2019 2:41 am

create is a classmethod. Change that line to:

Syntax: Select all

entity = Entity.create('point_hurt')
Image
User avatar
Painkiller
Senior Member
Posts: 725
Joined: Sun Mar 01, 2015 8:09 am
Location: Germany
Contact:

Re: [HL2:DM] effects

Postby Painkiller » Sun Mar 31, 2019 3:03 am

yes, thank you Satoon

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 34 guests