I picked up an old project today and decided to group various rooms into different regions. Everything went fine until I tried to add the “White Rooms” listed immediately below to the “White_Sector” region:
[code]“White Rooms Demo”
White 1 is a room.
White 2 is a room.
White 3 is a room.
White 4 is a room.
White 2 is south of White 1. White 3 is south of White 2. White 4 is east of White 1.[/code]
If I add the following region designation to the source code above:
White_Sector is a region.
White 1 and White 2 and White 3 and White 4 are in the White_Sector.
…I get the following error message:
“Problem: You wrote ‘White 1 and White 2 and White 3 and White 4 are in the White_Sector’ , but in another sentence ‘White 1 is a room’ : but this looks like a contradiction, because apparently something would have to be both a room and not a room at the same time.”
All of the other rooms and regions are similarly named (“Green 1,” “Green_Sector”), but “White 1”, etc., is the only thing giving me this problem, which persists when I change “White” to something else.
[code]
White_Sector is a region.
White 1 and White 2 and White 3 and White 4 are in the White_Sector.
White 1 is a room.
White 2 is a room.
White 3 is a room.
White 4 is a room.
White 2 is south of White 1. White 3 is south of White 2. White 4 is east of White 1.[/code]
So, must be static from somewhere else in the source code. Have you tried copying bits of the code into a new project until you can reproduce the error?
I copied the code above into a separate project to see if I could get a different result. Previously I tried moving the “region” definition before the room definitions, but I still got the same error message. I even tried removing “extra” blank spaces, to no avail. (frowning)
I’m using Inform 7 version 6M62 on a Windows 8.1 machine. Maybe I should reinstall it and try again? (EDIT: No effect, still getting the same error message)
I’m guessing something somewhere else is confusing Inform immensely, causing it to throw spurious error messages on some innocent code later in the project. If you copy-paste just the definition of the white rooms+region into a new project, does it work?
No, I’m still getting the same exact error message, even after reinstalling Inform 7 version 6M62. (heavy sigh)
I was hoping to make some progress on this project, but I guess the path of least resistance is to just forget about the regions, which I was hoping to use as a management tool. (furrowed brow)
I’m shaking my head in disbelief, but your version compiles perfectly without any problems at all. I copied and pasted the first two lines (the third one was still included in my working source code), and my original project compiled just fine.
In the original code there are two spaces after White_Sector. My guess is that the first one is some special space character (non-breaking, zero-width, …) or an invisible special character that was converted to space when copy-pasting to the post. So when you had “White_Sector is a region” it was actually “White_Sector[special character] is a region” which would be different from “White_Sector” without the bad character.
For what it’s worth, I was able to reproduce the error in the original post by omitting the declaration that White_Sector is a region, with appropriate source code order:
[code]White 1 and White 2 and White 3 and White 4 are in the White_Sector.
White 1 is a room.
White 2 is a room.
White 3 is a room.
White 4 is a room.
White 2 is south of White 1. White 3 is south of White 2. White 4 is east of White 1.[/code]
This yields the “room and not a room at the same time” error. I think that the Inform compiler interprets the first line as defining a container with four things in it, and then gets annoyed when we tell it it’s a room.
I do think that we need to say “White_Sector is a region” before we say what rooms are in it. Though you did say you tried it, but maybe something went iffy there (or there was that special space character issue).