Naming Rooms - "White" is off limits?

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.

Source code gremlins, maybe? (shrug)

Thanks in advance! :smiley:

If I just use the code you gave it compiles:

[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?

matt,

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?

Daniel,

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)

Try this?

[code]White_Sector is a region.

White 1, White 2, White 3, and White 4 are rooms in White_Sector.

White 2 is south of White 1. White 3 is south of White 2. White 4 is east of White 1.[/code]

chinkeeyong,

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.

Thanks for being my personal Inform 7 superhero! :smiley:

Remember, grasshopper: anything is possible with the power of parser-fu.

Order of declarations sometimes matters, although I don’t know why you were having a problem with matt’s first example.

Reinstalling Inform is rarely helpful. :confused:

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.

I’ve run into this before with regions. It looks like this code:

White 1 and White 2 and White 3 and White 4 are in the White_Sector.

was implicitly defining your set of rooms, such that later on, this code:

[code]White 1 is a room.

White 2 is a room.

White 3 is a room.

White 4 is a room. [/code]
…was considered a name conflict. It must be something about the way new rooms are declared implicitly.

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).

Indeed, sensei! Still so much to learn. (bowing deeply)

Yeah, that was an ancient DOS/Windows “Sheer Desperation Move.” :blush:

I wondered if it was something like that, as well.

Yeah, I think this was one of my first Inform 6 -> Inform 7 “translations,” and apparently Things Did NOT Go Well.™

Looking back at all of the comments (and considering my “I6/I7” disclaimer above), yeah, I think everybody’s right.

Thanks so much for the commentary and the (Impressive announcer’s voice) “illumination” regarding this little snafu. All better now! :smiley: