After asking Gorden about something:
if the topic understood is a topic listed in the Table of Gorden Responses:
say “[Response entry]”;
instead of list-asking a person:
if the noun is Gorden:
let T be the Table of Gorden Responses;
list options from T;
otherwise
say “You can not ask any more questions you bloke”
To list options let from (T - a table name):
let N be the number of rows in T;
if N is 0:
say “There is nothing else to ask about”;
otherwise:
say “You can ask about”;
repeat X running from 1 to N minus 1:
say “[Index of X row in T][If N is greater than 2] [end if]”;
if N is greater than 1:
say “or”;
say “[Index of N row in T].”
In what way is it wrong, does it show an error when you try to run it (and what does the error message say) or does the resulting game not do what you expected?
After asking Gorden about something:
if the topic understood is a topic listed in the Table of Gorden Responses:
say “[Response entry]”;
instead of list-asking a person:
if the noun is Gorden:
let T be the Table of Gorden Responses;
list options from T;
otherwise
say “You can not ask any more questions you bloke”
To list options from T:
N be the number of rows in T:
if N is 0:
say “There is nothing else to ask about”;
otherwise;
say “You can ask about”;
repeat X running from 1 to N minus 1:
say “[Index of X row in T][If N is greater than 2] [end if]”;
if N is greater than 1:
say “or”;
say “[Index of N row in T].”
I fixed a lot of the mistakes but. It is saying:
The rule or phrase definition ‘N be the number of rows in T’ seems to use indentation and colons to group phrases together into ‘if’, ‘repeat’ or ‘while’ blocks. That’s fine, but then this phrase seems to be missing some punctuation - ‘otherwise’. Perhaps a colon is missing?
It’s because you don’t have a colon : after ‘otherwise’ in the first instance, and in the second instance you have a semi-colon after otherwise, not a colon…