Nested if..else… breaking parental flow?

theimonnahos

New Member
I'm running through a few scenarios with some IFs and I'm running into something that defies my logic/understanding.Yes, I'm very low-level with programming, so maybe I'm royally screwing up something very rudimentary.Anyway, I have something like so:\[code\]if(condition==1) { if(conditionA==2) { // SAY I LOVE YOU } else { // SAY HEY BABY }}if(condition2==1) { if(conditionAA==2) { // SAY I LOVE YOU } else { // SAY HEY BABY }}\[/code\]Now, when condition1 and condition2 are both equal to 1 and conditionA and conditionAA do NOT equal 2, the else statements are fine. However, when conditionA or conditionAA DO equal 2, the whole scenario breaks at that very spot.For example, conditionA DOES NOT equal 2, the else fires and if conditionAA IS equal to 2 ,stuff breaks there. If conditionA DID equal 2, the whole thing breaks right there.I don't understand why :(Thanks in advance. Your advice will help me to restructure this mess.
 
Back
Top