Indiana Jones puzzle

In some month’s I haven’t opened inform at all, and now when I try to remember what I did in the start of the year, I found this topic.


I tried to execute the example, but I got an error:

This is the report produced by Inform 7 (build 6G60) on its most recent run through:

Problem. The phrase or rule definition ‘Instead of taking the sphere’ 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 sphere is not on the pedestal’ , 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.[/i]

If I remember correctly, I have had this kind of errors when I try to copy/paste codes from the forum. How these can be fixed?

Thanks in advance.

Change the strings of spaces on the indented lines to tab characters.

I deleted the spaces and there aren’t spaces at the end of the lines:

“Indiana Jones puzzle” by jan kupila

The Test Lab is a room.

The pedestal is in the Lab. A golden sphere is on the pedestal. The player carries meat. The indefinite article of the meat is “some”.

Instead of taking the sphere:
if the sphere is not on the pedestal:
continue the action;
otherwise if the meat is on the pedestal:
continue the action;
end the story saying “Knives shoot out of the wall and slice you apart!”

Same error. What did I wrong?

Would it help if I take empty page and hand-write the text again?

When posting your own code:

If you put code tags around your code, it will be possible to see the tabs more clearly in your post.

When using code from someone else’s post:

If you click the “quote” button and copy the code from the edit window, you will be able to preserve the original text with its tabs intact.

This appears to have no tabs at all. The tabs are needed to make the code work. There should be one tab before the lines “if the sphere…”, “otherwise if the meat…”, and “end the story…”. There should be two tabs before both lines that say “continue the action.”

Thanks, I’ll add the tabs.

edit: Now it works. Thanks again!