Re: My Inform box won't work!


7 Aug 95 12:56:01 BST

In article <19950805.122516.50@arnod.arnod.demon.co.uk>, jools@arnod.demon.co.uk (Julian Arnold) writes:
> Julian Arnold (jools@arnod.demon.co.uk) wrote:
>
>> I'm writing a game for the competition with Inform, but have run into a
>> problem with the `box' command. The following code won't compile and I think
>> it should. If I remove the `box' command it works fine. What's the problem?
>> I'm using Inform 5.4 (v1401), Library 5/9. (BTW, this is *not* an example of
>> the quality of puzzles in my game).
>
> [ code removed ]
>
> OK, I can answer my own question. 8) The `box' command cannot be used in a
> local routine, so put it in a global routine called `Quotations' and make a
> call to this global routine from the local routine with an argument for the
> quote you want to use. It's simple really, but wasn't covered in the manual.
>

Just to expand on this: it was a bug in Inform 5.4, which has been fixed in
5.5. So it's all my fault.

Actually, though, one doesn't really want to produce boxes this way in
any event. The neat way to do it is to just set a flag in the local routine,
and then once a turn (when the prompt is being printed up) check this
flag and then produce the box. (The Prompt: slot in LibraryMessages
is a neat way to do this.) All this fuss prevents the box from scrolling
away into the distance before the player can read it.

Graham Nelson