Hi, I’m pulling out my hair trying to figure this out. This seems incredibly basic yet I can’t figure out what I’m doing wrong.
Early in my game I have this:
the mugcounter is a number that varies.
the mugcounter is 0.
Later in the game, I have this code. This code works:
To say excomm:
increment the mugcounter;
choose row mugcounter in the Table of CoffeeMug Responses;
say "[phrase entry][paragraph break]";
The problem is I have 6 entries in my Table. I want the user to be stuck receiving that 6th response until they break out of that puzzle. So i thought, okay, let me test the mugcounter, if it’s > 6, let me set it to 6, which will give the player that last response over and over until they input the correct command. Perfect. So, I changed the last piece of code to the following:
To say excomm:
increment the mugcounter;
if the mugcounter > 6: <---- new, added code
now the mugcounter = 6; <---- new, added code
choose row mugcounter in the Table of CoffeeMug Responses;
say "[phrase entry][paragraph break]";
I get the following error:
The phrase or rule definition ‘To say excomm’ 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 ‘say “[phrase entry][paragraph break]”’ , in case that helps.
Can I not use an IF statement within a TO SAY block? Again, I feel this is a basic thing that I’m not understanding. Sorry if this is too basic! And thanks for any help! (i did check and i’m using only tabs in the new added lines of code)
Thanks!