get_team_index() - error

Please post any questions about developing your plugin here. Please use the search function before posting!
MrMalina
Member
Posts: 53
Joined: Mon Apr 08, 2013 2:40 pm
Location: Russian Federation

get_team_index() - error

Postby MrMalina » Wed Apr 15, 2015 6:27 pm

I would like to receive via PlayerIter list of players:

Syntax: Select all

from filters.players import PlayerIter

def load():
for index in PlayerIter(is_filters=["t", "ct"], return_types="index"):
print(index)


When using an error:
Скриншот 2015-04-15 21.24.26.jpg

Скриншот 2015-04-15 21.24.26.jpg
Attachments
1.jpg
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Wed Apr 15, 2015 6:50 pm

I know what the issue is. I will fix that tonight.
Image
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Thu Apr 16, 2015 12:58 am

Woops, my fault! :)
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Thu Apr 16, 2015 1:57 am

By the way, 2 points on your script. First, 'index' is the default return_type, so there is no need to pass it. Second, as I mentioned in another thread, there is no way a player can be both a Terrorist and a Counter-Terrorist, so no players will be iterated over.

*Edit: fixed the issue:
https://github.com/Source-Python-Dev-Team/Source.Python/commit/4b91bb1d87ce56292e85d0f8d9a5f3da5307a5c0
Image

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 149 guests