Nested if and elseif statements with multiple variables not functioning

Twine Version: 2.7.1.0
Sugarcube version: 2.36.1

Hello, I’ve been working on this code for a couple of days now and have been unable to get it to correctly work. If anyone could tell me what’s wrong it would be greatly appreciated!

<<if $mchairtype is "bald" and $facialhair is "None">>
You don't have any hair, as you are bald.
<</if>>
<<if $mchairtype is "bald" and $facialhair isnot "None">> You don't have any hair on your scalp, but you do have 
    <<if $facialhair is "stubble">>
    some $facialhair.
    <<elseif $facialhair isnot "stubble">>
    a $facialhair.
    <</if>>
    <</if>>
<<if $hair is "B">>
<<if $facialhair is "None">>
    	<<if $mchairstyle is "unstyled">>
		You have $mchairlength, $mchaircolor, $mchairtype that aren't styled in any way.
        <<elseif $mchairstyle isnot "unstyled">>
        	<<if $mchairtype isnot "patterned" and $mchairtype isnot "short pigtails" and $mchairtype isnot "pigtails" and $mchairtype isnot "long pigtails">>
        	You have $mchairlength, $mchaircolor, $mchairtype that is styled into a $mchairtype.
            <<else>>
            You have $mchairlength, $mchaircolor, $mchairtype that are styled into $mchairtype.
            <</if>>
            <</if>>
    <<elseif $facialhair isnot "None">>
    	<<if $mchairstyle is "unstyled">>
        	<<if $facialhair is "stubble">>
			You have $mchairlength, $mchaircolor, $mchairtype that aren't styled in any way as well as some $facialhair.
            <<elseif $facialhair isnot "None" and $facialhair isnot "stubble">>
            You have $mchairlength, $mchaircolor, $mchairtype that aren't styled in any way as well as a $facialhair.
            <</if>>
        <<elseif $mchairstyle isnot "unstyled">>
        	<<if $mchairtype isnot "patterned" and $mchairtype isnot "short pigtails" and $mchairtype isnot "pigtails" and $mchairtype isnot "long pigtails">>
            	<<if $facialhair is "stubble">>
				You have $mchairlength, $mchaircolor, $mchairtype that are styled into a $mchairtype. as well as some $facialhair.
            	<<elseif $facialhair isnot "None" and $facialhair isnot "stubble">>
            	You have $mchairlength, $mchaircolor, $mchairtype that are styled into a $mchairtype as well as a $facialhair.
                <</if>>
            <<else>>
            	<<if $facialhair is "stubble">>
				You have $mchairlength, $mchaircolor, $mchairtype that are styled into $mchairtype as well as some $facialhair.
            	<<elseif $facialhair isnot "None" and $facialhair isnot "stubble">>
            	You have $mchairlength, $mchaircolor, $mchairtype that are styled into $mchairtype as well as a $facialhair.
                <</if>>
                <</if>>
                <</if>>
                <</if>>
                <</if>>
<<if $hair is "notB">>
<if $facialhair is "None">>
        <<if $mchairstyle is "unstyled">>
        You have $mchairtype, $mchairlength, $mchaircolor hair that isn't styled in any way.
        <<else>>
            <<if $mchairtype isnot "patterned" and $mchairtype isnot "short pigtails" and $mchairtype isnot "pigtails" and $mchairtype isnot "long pigtails">>
            You have $mchairtype, $mchairlength, $mchaircolor hair that is styled into a $mchairtype.
            <<else>>
            You have $mchairtype, $mchairlength, $mchaircolor hair that is styled into $mchairtype.
            <</if>>
    <<elseif $facialhair isnot "None">>
        <<if $mchairstyle is "unstyled">>
            <<if $facialhair is "stubble">>
            You have $mchairtype, $mchairlength, $mchaircolor hair that isn't styled in any way as well as some $facialhair.
            <<elseif $facialhair isnot "None" and $facialhair isnot "stubble">>
            You have $mchairtype, $mchairlength, $mchaircolor hair that isn't styled in any way as well as a $facialhair.
            <</if>>
        <<elseif $mchairstyle isnot "unstyled">>
            <<if $mchairtype isnot "patterned" and $mchairtype isnot "short pigtails" and $mchairtype isnot "pigtails" and $mchairtype isnot "long pigtails">>
                <<if $facialhair is "stubble">>
                You have $mchairtype, $mchairlength, $mchaircolor hair that is styled into a $mchairtype. as well as some $facialhair.
                <<elseif $facialhair isnot "None" and $facialhair isnot "stubble">>
                You have $mchairtype, $mchairlength, $mchaircolor hair that is styled into a $mchairtype as well as a $facialhair.
                <</if>>
                <</if>>
         <<else>>
                <<if $facialhair is "stubble">>
                You have $mchairtype, $mchairlength, $mchaircolor hair that is styled into $mchairtype as well as some $facialhair.
                <<elseif $facialhair isnot "None" and $facialhair isnot "stubble">>
                You have $mchairtype, $mchairlength, $mchaircolor hair that is styled into $mchairtype as well as a $facialhair.
 <<else>>
 <</silently>>
 kjhjhghjhjh
 <</silently>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>

(forgive me if this isn’t formatted properly or information is left out, I’m not familiar with this website or its layout!)

<if $facialhair is "None">> ← missing a < before
which means you’re also missing a closing <</if>> towards the end
(also your <</silently>> don’t have an open one)

Ah thank you, I’ll see what happens when I fix those!

Ok, that seems to have fixed a small issue but I still get an error message stating "Error: <<if>>: <<else>> must be the final clause" in relation to a <<if $facialhair is "None">> (presumably the one right after the "hair is “notB”)

The same <<if>> macro call that was missing a leading < contains an inner <<if>> macro call that is missing its <</if>> end-tag.

	<<if $facialhair is "None">>
        <<if $mchairstyle is "unstyled">>
        	You have $mchairtype, $mchairlength, $mchaircolor hair that isn't styled in any way.
        <<else>>
            <<if $mchairtype isnot "patterned" and $mchairtype isnot "short pigtails" and $mchairtype isnot "pigtails" and $mchairtype isnot "long pigtails">>
            	You have $mchairtype, $mchairlength, $mchaircolor hair that is styled into a $mchairtype.
            <<else>>
            	You have $mchairtype, $mchairlength, $mchaircolor hair that is styled into $mchairtype.
            <</if>>
        <!-- missing end-tag -->

Your code example also contains two <</silently>> end-tags, but the example doesn’t contain any<<silently>> open-tags.

Thank you both so much!! This has fixed all the issues, I can finally move on :'D.