area.gifSector not Closed

 

Sector not closed is one of the most confusing messages for beginners. This section explains what it really means. Itís assumed you have read the overview for the basic terms, like LineDef, SideDef and Sector.

 

Sector Not Closed Errors, Most Likely Causes

 

NOTE : See picture at the end for how a Sector should look.

 

a. You have 1-Sided LineDefs and they do not all go the same direction. This is easy to see and understand. If 1-sided lines are used to create an area and all of a sudden the sidedef flips to the other side, the player canít see it anymore. This is easy to fix, just press Ctrl+F to flip the LineDef (assuming you have Sidedef1 defined).

 

b. The Sector reference used in the SideDef does not match an opposite LineDef/SideDef that uses the same Sector.

 

Remember, we are trying to mimic a real 3-D room. If you look at a real room and place yourself next to a wall, what do you see when you look at the wall facing you?

 

You see the floor and ceiling connecting to that wall. If the opposite wall did not have the same floor and ceiling (it had the floor and ceiling of the bathroom and you are in the living room) you have a sector not closed. Simple!

 

All the walls in a Room must have the same sector number describing the same floor and ceiling!

 

You get errors by drawing and deleting areas and therefore implicitly changing the SideDefs (which contain the Sector numbers) and nothing matches anymore.

 

As an experiment, go to a good existing level and change 1 of the SideDefs to be a different Sector, and you will get the infamous not closed message.

 

You fix this by changing the reference Sector for the SideDef in LineDef edit mode. So fix the error you made above to see that this really works.

 

Sometimes Sector errors are visible as a gap in sector display.

 

If you see a red Sector, you have no sector defined at all at that spot (if it's not a tag)!

 

A quick recap:

 

The enclosed area (room) described by the SideDefs must all use the same Sector number for the side that points to the room.

 

For an object in a room, the outside wall of the object should be the same Sector number as the Sector (or room) that it is contained in.

 

Look at the SideDefs and compare the Sector reference numbers used. As you follow the LineDefs, look at the bottom display and view the Sectors active.

 

For an object, (the LineDefs point out), Sector numbers must match the Sector of the immediate area (room) the object is in.

 

c. 2-sided LineDefs that do not make a complete loop. (you forgot to finish it or perhaps they were all supposed to be deleted) can mislead the routine into reporting totally different Sectors as not closed. This is a tough one to spot, since the error is not at all where you are looking.

 

Sectors at about 90 degrees to the line-of sight are good candidates.

 

d. In some rare instances, there is not enough accuracy in the math-coprocessor to determine the Sector. Examine the Sector pointed to. If you see a good Sector on both sides of the problem area, then everything is OK. This is fairly rare, so be sure to check the rest. (No level in DOOM, DOOM II,HEXEN or HERETIC has this problem.)

 

How a Sector should Look

 

Here is how all Sectors should look. Exceptions to this drawing are possible for special effects, but this is for experienced users only!

 

a. L1 through L4 represent 4 LineDefs.

 

b. The - sticking out of the side of each LineDef, represents the Sidedef1 side of the LineDef.

 

sectornotclosed1.gif

 

The rule is simple: All SideDefs that are opposite one another, have the same Sector number.

 

So all the 22s indicate that all the Sidedef1s of all the LineDefs have a Sector number of 22.

 

If for example, L1 had a Sector number of 33 (any number but 22), then L1 would get a Sector not closed error.

 

If a LineDef is 2-sided, then it could be Sidedef1 or Sidedef2 that has to have the Sector reference numbers match.

 

Now we carry this concept one step further with an object within a room and you should have a better idea of how to trouble shoot.

 

sectornotclosed2.gif

 

The inner area is the same one as before, consisting of LineDefs labeled L1, L2, L3 and L4. All the Sidedef1 sides reference Sector 22.

 

All the LineDefs in the inner area are now 2-sided. The Sidedef2s (the outside) of the inner rectangle all have a Sector reference of 55. The LineDefs are labeled L5, L6, L7 and L8.

 

If you look at the outer rectangle, you'll notice that all the Sidedef1s have the SAME Sector number, 55. This matches the Sector number of the inner rectangle Sidedef2s. In this example, you can match up the Sidedef1s with the Sidedef2s, but as shown earlier, this can vary.

 

That's it, it's that simple! You just have to match the sides of LineDefs with the sides of the other LineDef sidedef and make sure that the Sector numbers match up.

 

Automatically Fix Sector Errors

 

Many times you can fix common sidedef sector reference mistakes automatically by using the Automatic Sector Fix command - alt+F10. Please see Sector Fixing (Automatic)