Here I am, coding along, and suddenly there’s an error in the extension, which has been working all along…
[code]This is the report produced by Inform 7 (build 6G60) on its most recent run through:
In Book 2 - Abbreviated commands for addressing the current interlocutor in the extension Conversation Framework by Eric Eve:
Problem. In the sentence ‘let np be the number of visible people who are not the player’ , I was expecting to read a description of values, but instead found some text that I couldn’t understand - ‘visible people who are not the player’.
I was trying to match this phrase:
number of (visible people who are not the player - description of values)
This was what I found out:
visible people who are not the player = something unrecognised[/code]
There’s several similar errors in the extension saying I7 is having trouble with “visible people/person who is not the player”. How could have have broken this extension…I don’t think I redefined visible, but was trying to make “another person” work. Any ideas?
I think I’d need to see a complete code sample that recreates the problem.
I’ve seen others do this, and this is also what I do:
Definition: A person is other if it is not the player.
I isolated the code that breaks the extension. If this is commented out, the game compiles.
[code][an MP3 player is a device in gymbag. The description is “A small bit of metal that plays your favorite songs[if the player holds earbuds] through the connected earbuds[end if].”
some earbuds are a wearable thing in gymbag. The description is “Two earbuds with wires[if the player carries mp3 player] that lead to your MP3 player[end if].” Understand “headphones/phones/bud/buds” as earbuds.
Every turn when the player wears earbuds:
if mp3 player is switched on:
if the player can touch mp3 player:
if the player carries mp3 player:
say “[one of]Your music blares in your ears.[or]Your music shuts out pretty much everything else.[or]You glaze over, listening to your music.[or]You turn down the music just a bit, hoping your eyes are not bleeding.[or]Soaring guitars wail in your ears.[or]There is a brief pause as the MP3 player shuffles to the next song.[cycling]”;
say “Your earbuds muffle sound, not connected to anything.”;
say “You feel foolish wearing the earbuds that aren’t connected to anything.”.][/code]
Yeah, the compiler gets confused when an object name contains the word “player”. (Filed as bug 956.)
You can work around this by naming the object “mp3-player”, and then using the printed name property to display it properly.
Now I got it, I worked it out by trial and error and was coming back to post this. Big ol’duh on my part!