I'm getting this strange error and I don't know where it's coming from. I'm updating my FlashFun.SP script for the January 15 release and the entity changes.
The error:
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File '../addons/source-python/packages/source-python/plugins/manager.py', line 78, in __missing__
instance.globals['load']()
File '../addons/source-python/plugins/flashfunsp/flashfunsp.py', line 253, in load
for player in map(Player, playeriter_alive):
File '../addons/source-python/packages/source-python/filters/iterator.py', line 39, in __iter__
if not self._is_valid(item):
File '../addons/source-python/packages/source-python/filters/iterator.py', line 77, in _is_valid
if not self.manager._filters[filter_name](item):
File '../addons/source-python/packages/source-python/filters/players.py', line 113, in <lambda>
playerinfo).get_property_int('pl.deadflag'))
AttributeError: 'Edict' object has no attribute 'get_property_int'
players.py
flashfunsp.py lines to cause the error:
Syntax: Select all
from filters.players import PlayerIter
from flashfunsp.config import config_manager
from flashfunsp.players import Player
# ...
playeriter_alive = PlayerIter(is_filters="alive")
# ...
def prepare(player):
"""
Prepares the player for the battle.
"""
# set health, armor and cash attributes
player.health = config_manager["health"]
player.armor = 0
player.cash = 0
# remove their weapons
player.strip()
# is spawnprotection enabled?
seconds = config_manager["spawnprotection"]
# if yes, start the spawnprotection loops
if seconds:
player.god = True
player.spawnprotection_loop(seconds)
# ...
def load():
# prepare each alive player
for player in map(Player, playeriter_alive):
prepare(player)
Can you help me figure this out? :)