Question concerning Menus by Emily Short.

Hi again (and many thanks for helping me earlier). I’m trying to incorporate ShadowChaser’s Basic Characters extension, and one of the extensions it relies on is Emily Short’s Menus.

I’m getting two errors when I go to test the code regarding Menus. I’m not sure what the errors are actually telling me though, I THINK it might be because I haven’t actually created any tables of my own yet. Admittedly, this may be a bit ambitious for what I know so far. I was mostly just trying to learn how Basic Characters worked in order to set up something like a stamina attribute for the player character, that would decrease with certain actions and replenish with rest.

This is the report produced by Inform 7 (build 6G60) on its most recent run through:
In Section 1 in the extension Menus by Emily Short:
Problem. In the sentence ‘if the current menu is table of start game or current menu is the table of sex choice or current menu is the table of basic combat begin’ , I was expecting that ‘current menu is table of start game or current menu is the table of sex choice or current menu is the table of basic combat’ would be a condition. It didn’t make sense as one long phrase, but because it was divided up by ‘and’/‘or’, I tried breaking it down into smaller conditions, but that didn’t work either. ‘current menu is table of start game’ did not make sense; ‘current menu is the table of sex choice’ did not make sense; ‘current menu is the table of basic combat’ did not make sense; so I ran out of ideas.
I was trying to match this phrase:
if (current menu is table of start game or current menu is the table of sex choice or current menu is the table of basic combat - a condition):
This was what I found out:
current menu is table of start game or current menu is the table of sex choice or current menu is the table of basic combat = something unrecognised

Problem. You wrote ‘otherwise’ : but this is an ‘else’ or ‘otherwise’ with no matching ‘if’ (or ‘unless’), which must be wrong.
See the manual: 11.8 > Otherwise

That line of code doesn’t appear anywhere in Menus (or, for that matter, in Basic Characters). Where are you getting it from?

If you’re looking for help, posting the errors that I7 throws up is not going to be as useful as posting the code that produced those errors.

Ah, ok. Well its in Section 1 of the extension, Version 4 of Menus by Emily Short.

Here’s the specific section

This is the quit rule:
if the current menu is table of start game or current menu is the table of sex choice or current menu is the table of basic combat:
rule fails;
otherwise:
decrease the menu depth by 1;
rule succeeds.

The ‘otherwise’ in the middle there is the one pointed out in the second error as well.

Okay, looking around the web, my best guess is that version 4 of Menus is not actually by Emily, but rather is a slightly modified version of Emily’s extension by someone else (probably Nuku Valente) for their own purposes. It seems very improbable that Emily would add something as RPG-specific as combat and gender-choice tables to a general-purpose extension. (Where did you find it?) Since the three tables it mentions are not documented elsewhere in the extension, and will break any game that the extension is plugged into unless the author knows to add them, I’m assuming it’s not intended for general use. The current version of the real Menus extension is 3.

The quit rule in version 3 of Menus should read:

This is the quit rule: decrease the menu depth by 1; rule succeeds.
I think that this is the only difference, but I haven’t compared the two exhaustively.

Hrmm. Yeah, I’m not sure quite where it came from, I have grabbed a number of things as I’ve been playing with this, Nuku’s FS source among them. I didn’t think about that, is there any way to get a clean copy of a built-in extension without re-installing? Not a huge deal if not I guess. I’m mostly just building a kind of sandbox thing right now to figure out what I can actually accomplish. Its been fun for the most part, anyway. Thanks for your help!

You don’t need to reinstall Inform, just the extension. This will replace the version that was previously installed, even if it is an earlier version.

Yes, but you can’t grab the built-in extensions from the extensions site. They only come with the IDE, don’t they?