Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not self.caller.db.has('mark'):
- self.caller.db.mark = {}
- "RETURNS ERROR"
- """
- Traceback (most recent call last):
- File "d:\muddev\evennia\evennia\commands\cmdhandler.py", line 591, in _run_command
- ret = cmd.func()
- File "d:\muddev\mygame\commands\command.py", line 330, in func
- if not self.caller.db.has('mark'):
- TypeError: 'NoneType' object is not callable
- """
- "Working Alternative"
- class CmdMark(Command):
- """
- Mark the current location.
- Usage:
- mark <custom mark name>
- Marks the player's current location, using the provided arguments.
- For a list of marks, simply type 'mark' with no argument.
- """
- key = "mark"
- def func(self):
- if not self.caller.db.mark:
- self.caller.db.mark = {}
- if not self.args:
- marks = self.caller.db.mark
- return self.caller.msg(f"{marks}")
- self.caller.db.mark[self.args] = self.caller.location.dbref
- self.caller.msg(f"{self.args} was added to your list of marks as {self.caller.location}.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement