C# Why Won't My GUI Layout Button Appear?

A quick question and problem I’m having here. I want to know why won’t my GUI Layout button appear on the Window Rect like the others before it. To understand what I’m saying, you’ll need my script: http://pastebin.com/vYkTyEcP

Since it’s a little long I recommend trying it out in Unity. Anyways when I click the “Options” GUI Layout button, it takes me to a new Window Rect called “Options Menu”. In the Options Menu it has another GUI Layout Button called “Audio Settings”, and when I click that, it takes me to another new rect called “Audio”, however when I try to get another GUI layout button called “Settings” to appear in the Audio rect, it doesn’t. How can this be? It works for the Audio Settings but not for this?

By the way I created this script myself by randomly messing around with it, hence why it is so inefficient, because again this came from the top of my head. I made most of the script in about an hour or so, and have been trying to figure out the problem I’m having now since morning(it is now night for me). So please help if you want to.

Looks like a simple logic error: when you go to the sound menu, you set optionsmenu to false… but because of the way your blocks are nested, you only check soundsettings if optionsmenu is still true.

You probably intend for soundsettings to be checked, regardless, so you can just move it out of that block.

Short answer: the } closing brace on line 115 needs to move up to line 107.