evennia / evennia

Python MUD/MUX/MUSH/MU* development system

Home Page:http://www.evennia.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Documentation] 13.2.2. Extra credits not searching for item before actions

BurrowsForge opened this issue · comments

Existing page / new

https://www.evennia.com/docs/latest/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Making-A-Sittable-Object.html

Documentation issue

In this tutorial in this section they are having you interact with the chair in certain ways. The suggestions they give you do not reflect the fact that you have to search for the chair first using py and then use your actionable code. This was confusing for me because when I was trying the suggested commands they were not working. While this is "extra credit" the provided code being incorrect can be confusing and may force you to head to the discord to try and figure out why it's not working.

Suggested change

I tried using
chair = evennia.search_object("chair");.... which gave me an "AttributeError: 'str' object has no attribute 'sitdesc'
@inspector Caracal on discord suggested using self.search,
chair = self.search("chair"); ......

ALSO:
the line
chair = evennia.create_object("typeclasses.sittables.Sittable", key="pallet") is missing , location=here) otherwise it is created somewhere else and then the user has to teleport the chair to them.

image

The first change you suggest is invalid - you are just making a typo and not using [0] to get the first element of the match.
Fair point about location=here, added that. 👍