DescribePlace(location) in Roodylib

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

Bainespal
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

DescribePlace(location) in Roodylib

Post by Bainespal »

I noticed that at some point, as I updated Roodylib and continued re-compiling "Tree and Star," the instances where I called DescribePlace stopped working, printing "Nothing" instead of the room description. I neglected this bug for a long time, figuring I would look into how the new routine works after I added more stuff. It turns out that it was blessedly simple to fix, though -- all I had to do was specifically add the (location) variable. So, I'm just making note that "DescribePlace" needs to be "DescribePlace(location)" now.

I think the feature of grouping objects for scene description purposes is an extremely good idea. I haven't used it yet, but I probably will.

Roody_Yogurt
Posts: 2179
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

DescribePlace was always meant to be called with an argument, but I think your code accidentally was always redirected to DoLookAround so it ended up working anyways.

Still, I'm not against the idea of making DescribePlace even easier, so I'll be happy to add this line to the beginning:

Code: Select all

if not place
     place = location

Post Reply