My code is wrong. Could you tell what I did

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?

rule definition is the error

Which one of the rules? Can you copy-paste the exact error message here?

Hi - as Juhana says, we’d really need to see the error you’re getting, but from a cursory glance, you have a lot of issues with this code:

  • You call a function ‘list options from T’ - but when you’ve defined it, you’ve defined it as ‘list options LET from’. You need to remove the word LET.
  • The syntax for the repeat loop is wrong - it needs to be ‘repeat with X…’
  • You’ve got several points with incorrect punctuation. The first otherwise needs a colon. End all the functions with a full stop.
  • The code [Index of X row in T] is incorrect. and I’m not sure what the following is supposed to do: [If N is greater than 2] [end if]

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…