Changing default blank command response

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

Changing default blank command response

Post by Bainespal »

Is there a way to substitute something else for the default "What?" printed when the player hits enter without typing anything? I notice that the "What?" string is neither stored in Message in hugolib.h nor VMessage in verblib.h. I don't know where it comes from.

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

Post by Roody_Yogurt »

That message is ParseError with error number 0, although that is one of the messages provided by the engine itself:
http://hugo.gerynarsabode.org/index.php ... ParseError

Still, you can change it just the same using NewParseError:
http://hugo.gerynarsabode.org/index.php ... ParseError

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

Post by Bainespal »

Yes, thank you. I noticed that I needed to explicitly return true in the errornumber condition for my replacement string, or else it goes on to print the old "What?" after my replacement message.

Post Reply