Help adapting code from 6L38 to 6M62

#1

Several years ago, I created a short game as an exercise and teaching example. The game compiles fine under 6L38 but throws three errors related to the Standard Rules when I attempt to compile it under 6M62. I want to revisit it and make some updates, but I’d really like to get it compiling under 6M62 first. Here are the error messages I get when compiling under 6M62 (they come after 71%, in the Generating code phase):

[spoiler][code] >–> In the sentence ‘begin the printing the description of a dark room
activity’ (the Standard Rules, line 2749), it looks as if you intend ‘the
description of a dark room’ to be a property, but ‘a room’ is not specific
enough about who or what the owner is. Sometimes this mistake is made
because Inform mostly doesn’t understand the English language habit of
referring to something indefinite by a common noun - for instance, writing
‘change the carrying capacity of the container to 10’ throws Inform because
it doesn’t understand that ‘the container’ means one which has been
discussed recently.
I was trying to match this phrase:
begin the (printing the description of a dark room - activity) activity

I recognised:
printing the description of a dark room = an activity

–> In the sentence ‘if handling the printing the description of a dark room
activity’ (the Standard Rules, line 2750), it looks as if you intend ‘the
description of a dark room’ to be a property, but ‘a room’ is not specific
enough about who or what the owner is. Sometimes this mistake is made
because Inform mostly doesn’t understand the English language habit of
referring to something indefinite by a common noun - for instance, writing
‘change the carrying capacity of the container to 10’ throws Inform because
it doesn’t understand that ‘the container’ means one which has been
discussed recently.
I was trying to match this phrase:
handling (printing the description of a dark room - activity on
values) activity
I recognised:
printing the description of a dark room = an activity
–> In the sentence ‘end the printing the description of a dark room
activity’ (the Standard Rules, line 2753), it looks as if you intend ‘the
description of a dark room’ to be a property, but ‘a room’ is not specific
enough about who or what the owner is. Sometimes this mistake is made
because Inform mostly doesn’t understand the English language habit of
referring to something indefinite by a common noun - for instance, writing
‘change the carrying capacity of the container to 10’ throws Inform because
it doesn’t understand that ‘the container’ means one which has been
discussed recently.
I was trying to match this phrase:
end the (printing the description of a dark room - activity) activity
I recognised:
printing the description of a dark room = an activity[/code][/spoiler]

I can’t figure out where the problem could be coming from in my code, since I don’t use light and darkness, and the errors are no help since they point to the Standard Rules as the problem. I don’t think the problem can be anything with my copy of the Standard Rules, because short test games compile fine. (Also, I’ve tried uninstalling and redownloading Inform.) I read through the 6M62 changelog and didn’t see anything that I thought explained this error, but it may well be that I don’t understand the problem well enough to recognize it.

Anyway, any advice you can offer would be welcome. The source of the game is available on GitHub. I apologize that I can’t include any sort of excerpt, but as I said, I have no idea where the problem is. Thanks for anything you can suggest.

(matt w) #2

The problem seems to be that your “printing” action now seems to be causing some kind of namespace clash with the name of the printing the name of the dark room activity. I changed the “printing” name to “laserprinting” and it compiles. (Of course you have to be careful not to change it where you don’t need to change it!)

#3

Oh, that makes perfect sense. Fixed now. Thank you very much!

#4

It’s been puzzling me. Why is there confusion here?

It’s not a problem with the activity itself, by the way: only its name. Here’s a small example showing the same problem.

Area is a room. 
Fooing the bar of a thing is an activity.
When play begins: begin the fooing the bar of a thing activity.
Bar is a kind of value. The bars are qux and baz. A thing has a bar.
Fooing is an action applying to one thing.

I’d have thought that the syntax “begin the ___ activity” was clear enough to avoid this sort of issue; but apparently not.

Should it be reported as a bug? It seems a shame that you can’t have a printing action in Inform any more.

(matt w) #5

Yes, that seems worth reporting.

#6

Done.