Page 1 of 1

[HL2:DM] effects

Posted: Sat Mar 30, 2019 8:15 pm
by Painkiller
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'

Re: [HL2:DM] effects

Posted: Sun Mar 31, 2019 2:41 am
by satoon101
create is a classmethod. Change that line to:

Syntax: Select all

entity = Entity.create('point_hurt')

Re: [HL2:DM] effects

Posted: Sun Mar 31, 2019 3:03 am
by Painkiller
yes, thank you Satoon