Advertisement
Kovitikus

Untitled

Nov 30th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.74 KB | None | 0 0
  1. """
  2. Traceback (most recent call last):
  3.  File "d:\muddev\evennia\evennia\commands\cmdhandler.py", line 644, in _run_command
  4.    ret = cmd.func()
  5.  File ".\commands\command.py", line 942, in func
  6.    if i.tags.has('merchant'):
  7. AttributeError: 'TagHandler' object has no attribute 'has'
  8.  
  9. An untrapped error occurred.
  10. (Traceback was logged 20-11-30 04:03:59-05).
  11. """
  12. # https://www.evennia.com/docs/latest/api/evennia.typeclasses.tags.html?highlight=taghandler#evennia.typeclasses.tags.TagHandler.has
  13.  
  14. class CmdStock(Command):
  15.     key = 'stock'
  16.     def func(self):
  17.         room_contents = self.caller.location.contents
  18.         for i in room_contents:
  19.             if i.tags.has('merchant'):
  20.                 self.caller.msg(i.return_stock())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement