OnClientConnect getting Player problem
Posted: Thu Dec 01, 2016 10:32 pm
Hi,
After update new version of sourcepython, we have a problem with getting player.
Traceback:
Please help us to fix this problem.
After update new version of sourcepython, we have a problem with getting player.
Syntax: Select all
@OnClientConnect
def on_client_connect(allow_connect_ptr, player_edict, player_name, ip_port, reject_msg_ptr, max_reject_length):
player = Player(index_from_edict(player_edict))
Traceback:
Syntax: Select all
Traceback (most recent call last):
File "../addons/source-python/plugins/automation/automation.py", line 246, in on_client_connect
player = Player(index_from_edict(edict))
File "../addons/source-python/packages/source-python/players/_base.py", line 86, in __init__
super().__init__(index)
File "../addons/source-python/packages/source-python/entities/entity.py", line 108, in __init__
super().__init__(index)
ValueError: Conversion from "Index" (2) to "BaseEntity" failed.
Please help us to fix this problem.