So I’m having issue with the following line of code:
*if (((gender = "female") and (preference = "both")) or ((preference = "women")))
Basically this code has to do with romance, but if you choose male as your gender, the choice will still pop up. I’ve already tried doing it different ways (putting gender last) but it’s still not working. I’m guessing it has something to do with the and/or part but I don’t know.
Whelp. But yea, that’s why I’m so confused. It literally says that it’s for females only so I have absolutely no clue what’s wrong. That’s why I thought maybe the order mattered.
I’m having a hard time describing in words how and why I did what I did. That’s probably a sign I should go to bed. Instead, I made a picture to demonstrate how I was interpreting the problem, and what I was trying to do with my suggestion. Because who needs sleep, really?
Doing my best to put it into words anyway (and hoping these words make any sense at all):
I tried make sure both sides of the “or” part of the condition would combine with the “and” part. To do this, I first made sure they were enclosed within a set of parentheses they didn’t share with anything else. This is the “((preference = "both") or (preference = "women"))” section.
I then added the “and” part outside of the parentheses for the “or” part (I put it in front, but it should work exactly the same at the back). That’s the “(gender = "female") and” section. Finally, I wrapped the whole mess in one last layer of parentheses to make sure CS couldn’t leave anything out by accident.
I feel there’s a significant chance these words have just made everything even more confusing, and I apologize. I hope they help despite my misgivings.