Coding looks right, but orientation is still wrong


#1

I have an orientation that has straight, gay, bisexual, and asexual, and I don’t know if it’s latter coding messing it up, or something I did initially, but in essence, my female gay option and my female straight option are being messed up. I don’t know if I’m overlooking something, or what, but I wanted to post the coding for others to look at.

It’s exactly what it sounds like, to clarify: when I click something that triggers the ‘homosexual flag’, in my stats screen I’m shown as straight, and vice versa for heterosexual. The flags for gender and everything else work perfectly, but it’s just this that’s being weird. Anyway, here’s the coding for specifically the parts I’m having issues with, followed by the full sexuality coding. The "#I was happy"s, also, have the same indentation as “#I could not return his affections”, I just don’t know how to fix that on this page.

<pre #I was happy. I was fond of him, too. \*if gender="male" \*set orientation "gay" \*goto end \*if gender="female" \*set orientation "straight" \*goto end #I could not return his affections. Why? \*choice #I'm into women. \*if gender="male" \*set orientation "straight" \*goto end \*if gender="female" \*set orientation "gay" \*goto end ___ #I was happy. I was fond of him, too. \*if gender="male" \*set orientation "gay" \*goto end \*if gender="female" \*set orientation "straight" \*goto end #I could not return his affections. Why? \*choice #I'm into women. \*if gender="male" \*set orientation "straight" \*goto end \*if gender="female" \*set orientation "gay" \*goto end #I like men, but I didn't want him. \*if gender="female" \*set orientation "straight" \*goto end \*if gender="male" \*set orientation "gay" \*goto end #I'm bisexual, but I didn't want him. \*if gender="female" \*set orientation "bisexual" \*goto end \*if gender="male" \*set orientation "bisexual" \*goto end #I'm asexual. \*if gender="female" \*set orientation "asexual" \*goto end \*if gender="male" \*set orientation "asexual" \*goto end

#2

This is just a suggestion, but I think “gay” and “straight” sound too blunt. How about just saying “Attracted to males”, “Uninterested” or “Attracted to females” ? This would also make the coding easier to handle, since there aren’t as many variables.


#3

Question, when you created the variables, did you initially set it as “” or “straight”? Maybe switching format a bit, with it as *if (gender = “female”) instead.


#4

Okay, pulling the code and testing, it works fine. The problem is, as far as I can tell not here (or at least, not strictly here). As babisko mentioned, I’d recommend making sure the stat has a default setting that is not one of the possible choices (I’d recommend something like “NA” or “NOT SET” for testing purposes) then run it again to see if that helps you narrow down the error.

Also, while testing, try to make sure you can narrow down where exactly it is happening. I say this only because the above code seems to work perfectly fine.


#5

You’re right, Samuel! I’ll fix it.

Also, it is set at “”, and I took your suggestion, Reaperoa, and I narrowed it down. What I did was cut old code and compare it to the new (I saved 2 versions of it) and I had changed my gender variable at one point to mcgender and didn’t follow through with every single one, so that’s why it was messing up. Thank you guys.


#6

No problem!