today I tried some basic things about Events.
My Code:
Code: Select all
# =============================================================================
# >> IMPORTS
# =============================================================================
from events import Event
from AoD._libs import saylib
# =============================================================================
# >> FUNCTION
# =============================================================================
@Event
def player_spawn(GE):
userid = GE.get_int('userid')
psay = saylib.saylib()
psay.tell('#greenYour userid is ' + str(userid) ,userid)
Error:
Code: Select all
[SP] Caught an Exception:
Traceback (most recent call last):
File '..\addons\source-python\_libs\addons\manager.py', line 48, in __missing_
_
instance = _LoadedAddon(addon_name)
File '..\addons\source-python\_libs\addons\manager.py', line 237, in __init__
self._addon = __import__(addon_name + '.' + addon_name)
File '..\addons\source-python\AoD\AoD.py', line 16, in <module>
from AoD._plugins import player
File '..\addons\source-python\AoD\_plugins\player.py', line 11, in <module>
from events import Event
File '..\addons\source-python\_libs\events\__init__.py', line 11, in <module>
from events.manager import EventRegistry
File '..\addons\source-python\_libs\events\manager.py', line 10, in <module>
from events import EventsLogger
ImportError: cannot import name EventsLogger