Item Showing Up Unnecessarily

I wasn’t entirely sure what else to title this as this error has me scratching my head somewhat.

Essentially, during the sort of “customization” phase of my WiP, the players can choose if the MC has earrings, a nose stud, a nose ring, or some combination of those. However, it appears as if the nose ring keeps showing up in their photo ID description no matter whether or not they’ve chosen it, and yet I’m struggling to find why this is, code-wise.

Here’s how the three variables are created in the startup file:

*create stud false
*create ring false
*create earrings false

Here’s how it appears when they’re choosing:

*fake_choice
		#Just earrings.
			*set earrings true
			There are some earrings pierced into- as the name implies- your ears.
			*line_break
			*line_break
			*goto mirror
		#Just a nose stud.
			*set stud true
			You have a small stud embedded into the side of your nose.
			*line_break
			*line_break
			*goto mirror
		#Just a nose ring.
			*set ring true
			You have a small ring looping through the middle of your nose.
			*line_break
			*line_break
			*goto mirror
		#Earrings and a nose ring.
			*set earrings true
			*set ring true
			There are some earrings pierced into- as the name implies- your ears, as well as a small ring looping through the middle of your nose.
			*line_break
			*line_break
			*goto mirror
		#Earrings and a nose stud.
			*set earrings true
			*set stud true
			There are some earrings pierced into- as the name implies- your ears, as well as a small stud embedded into the side of your nose.
			*line_break
			*line_break
			*goto mirror

And this is the text for the photo ID:

*if (((earrings = true) and (stud = false)) and (ring = false))
	The skin around your ears was a little red from having slept weirdly on your earring. 
*if (((earrings = true) and (stud = true)) and (ring = false))
	The skin around your ear and nose was a little red from having slept awkwardly on your earrings and nose stud. 
*if (((earrings = true) and (stud = false)) and (ring = true))
	The skin around your ear and nose was a little red from having slept awkwardly on your earrings and nose ring. 
*if (((earrings = false) and (stud = true)) and (ring = false))
	The skin around your nose was a little red from having slept awkwardly on your nose stud. 
*if (((earrings = false) and (stud = false)) and (ring = true))
	The skin around your nose was a little red from having slept awkwardly on your nose ring. 

I know it must be in here, somewhere, but I’m not entirely sure where… Any help would be greatly appreciated. Thank you!

I don’t think the problem is in the code.

2 Likes

Check what happens if you move from an *if/*if structure to an *if/*elseif/*else structure.

1 Like

I copy-pasted all three code samples into a new project, but I was unable to duplicate the error you describe. Everything functioned as intended. This implies, to me at least, either the error is elsewhere in your code, or it has something to do with cached data being retained inappropriately.

You could try clearing your browser’s cache then restarting your testing. It may also help to search your code to ensure there are no *set ring true commands elsewhere by mistake.

2 Likes

Or… you know, tell us what did the game displayed that you thought it as an error.

3 Likes

Well, I think it’s working now, I realized that I made the stupid, small mistake of naming another variable ‘ring’ and then forgetting that I’d done so. Whoops! Thank you for all your lovely suggestions though!

The error was in the first post:

However, it’s all fixed now.

Thank you again!

2 Likes