I’m creating a game using Basic Screen Effects and want to have a “pause the game” command. It works fine in Inform 7, but when I try to compile the game, I get error messages saying it doesn’t recognize the command"
“Problem. You wrote ‘pause the game’ : but this is a phrase which I don’t recognise, possibly because it is one you meant to define but never got round to, or because the wording is wrong (see the Phrasebook section of the Index to check). Alternatively, it may be that the text immediately previous to this was a definition whose ending, normally a full stop, is missing?”
Thanks for any help you can provide with this problem.
Hard to tell exactly without seeing your source, but make sure you’ve checked the obvious:
Have you included the line "Include Basic Screen Effects by Emily Short?
Is the ‘pause the game’ line a part of a well-formed statement. i.e. does it end in a semi-colon?
“Alternatively, it may be that the text immediately previous to this was a definition whose ending, normally a full stop, is missing?” makes me think that there may be a semi-colon missing at the end of the line immediately preceding ‘pause the game’,
Thanks for your replies. Here is the part of the code where this appears (copy/pasted from source, with relevant object/scene names etc. changed):
Include Basic Screen Effects by Emily Short. [usually leaving this out breaks it in Inform 7 when testing (before compiling); I frequently make that mistake]
When scene1 ends adverbially:
now object is off-stage;
say “what gets said”;
pause the game;
move player to car;
now description of player is “new player description.”;
now player wears jacket.
I thought that maybe it’s about where the line appears, but moving it to the end changes where the pause occurs, so it doesn’t solve the problem, and I get the same error message anyway…
Incidentally, I tried using other parts of the screen effects extension (e.g. turning some text red), and that also came up in the error. I removed that, as it wasn’t as crucial to the overall effect I’m trying to achieve. I can do without the “pause game” effect too, but it would be nice to know what’s going on here. It seems like it might have something to do with the extension itself? It’s supposed to be built-in, and it is version 7. I don’t know how to access the code on built-in extensions so that I can study it and see if there are some clues there…
Stupid question perhaps, but … you don’t erase the line “Include Basic Screen Effects by Emily Short.” before you press the release button, do you?
The fact that the extension is “built-in” doesn’t mean that it gets automatically included in your game. It only means that it comes shipped with the Inform 7 application. You still have to include it, both while writing the game and when releasing it.
Do you have any “Not For Release” Sections, Chapters, Parts, Books or Volumes at all? If you do and the line “Include Basic Screen Effects by Emily Short.” is in one of those sections, that could be causing the problem. Also, if this is the case, “release for testing” should work. If not, try posting your complete source code and we’ll try to find out what’s wrong.
rsmith writes “It works fine in Inform 7, but when I try to compile the game, I get error messages saying it doesn’t recognize the command.”
I don’t understand; how can anything work in Inform 7 before compiling?
climbingstars nailed it–I do have a debugging section “not for release” where I use Juhana’s “Include Object Response Tests” extension (a great extension to use, by the way), and by habit I put all of my “Include X extension” lines together…
So I’m happy (and a bit embarrassed) to say that the solution was pretty easy!