Why is the command not working correctly?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By start123

Instead of not letting the icon change, if this icon already exists, it simply passes.
What has been done wrong?
Here is the code:

select = "0"
apply1 = "0"
apply2 = "0"
apply3 = "0"
func _on_orange_pressed():
	select = "orange"
func _on_apple_pressed():
	select = "apple"
func _on_pear_pressed():
	select = "pear"
func _on_apply1_pressed():
	if apply2 or apply3 == select:
		pass
	else:
		if select == "orange":
			$icons/icon1.texture = game.orange
			apply1 = "orange"
		elif select == "apple":
			$icons/icon1.texture = game.apple
			apply1 = "apple"
		elif select == "pear":
			$icons/icon1.texture = game.pear
			apply1 = "pear"
func _on_apply2_pressed():
	if apply1 or apply3 == select:
		pass
	else:
		if select == "orange":
			$icons/icon2.texture = game.orange
			apply2 = "orange"
		elif select == "apple":
			$icons/icon2.texture = game.apple
			apply2 = "apple"
		elif select == "pear":
			$icons/icon2.texture = game.pear
			apply2 = "pear"
func _on_apply3_pressed():
	if apply1 or apply2 == select:
		pass
	else:
		if select == "orange":
			$icons/icon3.texture = game.orange
			apply3 = "orange"
		elif select == "apple":
			$icons/icon3.texture = game.apple
			apply3 = "apple"
		elif select == "pear":
			$icons/icon3.texture = game.pear
			apply3 = "pear"
:bust_in_silhouette: Reply From: rustyStriker
 if Object1 or Object2 == Object3

IS NOT THE SAME AS

 if Object1 == Object3 or Object2 == Object3

objects in an if statement in the end should evaluate to a boolean, usually if the item is null it is false and true if otherwise, what you did is basically saying

 if (Object1 != null) or (Object2 == Object3)

while object1 is not null, you wont be able to do anything

**just a side note use return instead of pass, as pass is just a placeholder and wont block anything(if im not mistaken) while return works like in any other language and exit the code block and goes back to the previous one