Can't get "Quiz Night" by Michael Callahan to compile

Hi all, I am BRAND NEW to inform 7 and IF but already feel myself becoming completely addicted. I hope to use IF to write medical educational scenarios. These will include many question and answer events between player and people in the game. I immediately found Callahan’s Questions extension, installed it, but cannot even get the sample Quiz Night to run. I copied it into the editor verbatim, and the last part of the source:

A menu question rule (this is the pub answer rule):
if the number understood is the expected answer:
if the table of quiz questions is not empty:
say “Well done. You have survived to the next round.”;
otherwise:
end the story finally saying “Congratulations you have won!” ;
otherwise:
end the story finally saying “You have been barred from the pub for getting a question wrong.” .

gives following error message every time I hit GO:

Problem. The phrase or rule definition ‘Every turn when the location is the pub (this is the pub answer rule)’ is written using the ‘colon and indentation’ syntax for its 'if’s, 'repeat’s and 'while’s, where blocks of phrases grouped together are indented one tab step inward from the ‘if …:’ or similar phrase to which they belong. But the tabs here seem to be misaligned, and I can’t determine the structure. The first phrase going awry in the definition seems to be ‘if the number understood is the expected answer’ , in case that helps.

This sometimes happens even when the code looks about right, to the eye, if rows of spaces have been used to indent phrases instead of tabs.

Being brand new to this, my debugging skills are minimal. Can anyone help me with this?

Your copying must have deleted the tab stops needed for indentation.
Your code should look like this:

A menu question rule (this is the pub answer rule): if the number understood is the expected answer: if the table of quiz questions is not empty: say "Well done. You have survived to the next round."; otherwise: end the story finally saying "Congratulations you have won!" ; otherwise: end the story finally saying "You have been barred from the pub for getting a question wrong." .
with the blank space at the beginning of lines produced by the correct number of tab stops:

A menu question rule (this is the pub answer rule):
<tab>if the number understood is the expected answer:
<tab><tab>if the table of quiz questions is not empty:
<tab><tab><tab>say "Well done. You have survived to the next round.";
<tab><tab>otherwise:
<tab><tab><tab>end the story finally saying "Congratulations you have won!" ;
<tab>otherwise:
<tab><tab>end the story finally saying "You have been barred from the pub for getting a question wrong." .

See section «11.7. Begin and end» in the built-in manual for some information on this.

The basic principle is: things that should be done or tested or happen only if a given condition is true, should be indented one tab stop further than that condition itself.

That works perfectly, Felix. Thanks so much! I can tell I am going to like this forum better than the online documentation or Aaron Reed’s book (which is GREAT). I really appreciate your help.

A useful tip: For examples that are in the extension documentation (or the Inform documentation itself), there is a little square icon at the very beginning of the code. Clicking on that icon should paste the code into your source with the tabs intact.

Thanks, Matt. i was wondering what that little box was for.
You guys are great!