Problem With onMouseDown and Integer Increment/Decrement

I’m having the strangest problem with my character selection script. I have box colliders on two arrows and they detect clicks properly but don’t update the integer properly. It always registers a click, but doesn’t do anything, and sometimes it increases or decreases by 2 instead of 1.

Here’s my script (yes, it’s a flappy bird rip-off, shh):

using UnityEngine;
using System.Collections;

public class SkinSelect : MonoBehaviour {
	string[] skins = {
		"DefaultBird",
		"ZombieBird",
		"RedBird"
	};
	int s;

	void Start() {
		s = PlayerPrefs.GetInt ("Skin", 0);
		foreach (GameObject bird in GameObject.FindGameObjectsWithTag("Player")) {
			if (bird.name != skins ~~) {~~

~~ bird.GetComponent ().enabled = false;~~
~~ } else {~~
~~ bird.GetComponent ().enabled = true;~~
~~ }~~
~~ }~~
~~ GameObject.Find (“MenuBird”).GetComponent().enabled = false;~~
GameObject.Find (skins ).GetComponent ().SetTrigger(“doFlap”);
~~ }~~

~~ void OnMouseDown() {
GameObject.Find (skins ).GetComponent ().enabled = false;
if (gameObject.name == “arrowLeft”) {
if (s < 0)
s–;
else~~
~~ s = skins.Length - 1;
} else if (collider.gameObject.name == “arrowRight”) {
if (s < skins.Length - 1)
s++;
else~~
~~ s = 0;
}~~

GameObject.Find (skins ).GetComponent ().enabled = true;
GameObject.Find (skins ).GetComponent ().SetTrigger (“doFlap”);
~~ PlayerPrefs.SetInt (“Skin”, s);
Debug.Log ("Trigger: " + gameObject.name + "
Skin: " + s);

}~~

}

What’s odd is that the log will show that the correct arrow is triggered but s will not update properly. For example:
Trigger: arrowLeft
Skin: 0

Trigger: arrowLeft
Skin: 2

Trigger: arrowRight
Skin: 2

Trigger: arrowLeft
Skin: 0
The results are seemingly inconsistent, though. I’ve tried incrementing and decrementing differently, but seriously why is this an issue at all?
If I change the script to only change s if it’s between 0 and 2, after cycling through all the skins once, it’ll skip the middle one and keep jumping between 0 and 2. I don’t understand at all.
OnMouseUp and OnMouseUpAsButton produce the same behaviour.

I solved this problem on my own. Because I had my SkinSelect script attached to two different GameObjects (each arrow), each arrow had its own instance of the script and the value at s was being reloaded without this being reflected on screen. I may have been able to solve this in a simpler way, but I chose to attach the script to their parent (empty) GameObject and use my OnClick script to call a function that handles updating s.

SkinSelect.cs:

using UnityEngine;
using System.Collections;

public class SkinSelect : MonoBehaviour {
	string[] skins = {
		"DefaultBird",
		"ZombieBird",
		"RedBird"
	};
	string[] skinNames = {
		"Default",
		"Zombie",
		"Red"
	};
	public int s;

	void Start() {
		s = PlayerPrefs.GetInt ("Skin", 0);
		foreach (GameObject bird in GameObject.FindGameObjectsWithTag("Player")) {
			if (bird.name != skins ~~) {~~

~~ bird.GetComponent ().enabled = false;~~
~~ } else {~~
~~ bird.GetComponent ().enabled = true;~~
~~ }~~
~~ }~~
~~ GameObject.Find (“MenuBird”).GetComponent().enabled = false;~~
GameObject.Find (skins ).GetComponent ().SetTrigger(“doFlap”);
GameObject.Find (“BirdNameText”).GetComponent ().text = skinNames ;
~~ }~~

~~ public void ChangeSkin(string arrowPressed) {~~
GameObject.Find (skins ).GetComponent ().enabled = false;

~~ switch (arrowPressed) {
case “arrowLeft”:
if (s > 0)
s–;
else~~
~~ s = skins.Length - 1;
break;
case “arrowRight”:
if (s < skins.Length - 1)
s++;
else~~
~~ s = 0;
break;
}~~

GameObject.Find (skins ).GetComponent ().enabled = true;
GameObject.Find (“BirdNameText”).GetComponent ().text = skinNames ;
GameObject.Find (skins ).GetComponent ().SetTrigger (“doFlap”);
~~ PlayerPrefs.SetInt (“Skin”, s);
//Debug.Log ("Trigger: " + gameObject.name + "
Skin: " + s);

}
}~~
onClick.cs:
using UnityEngine;
using System.Collections;

public class onClick : MonoBehaviour {

~~ SkinSelect arrowHandler;
menuHandler menu;~~

~~ void Start() {
arrowHandler = GameObject.Find (“Arrows”).GetComponent ();
menu = GameObject.Find (“Menu”).GetComponent ();
}~~

~~ void OnMouseUpAsButton (){
if (gameObject.name == “StartButton”)
menu.SelectScene (“OnlyLevel”);
if (gameObject.name == “OptionsButton”)
menu.SelectScene (“Options”);
if (gameObject.name == “BackButton”)
menu.SelectScene (“Menu”);
if (gameObject.name == “ResetScore”)
PlayerPrefs.SetInt (“highScore”, 0);
if (gameObject.name == “arrowLeft”)
arrowHandler.ChangeSkin (“arrowLeft”);
if (gameObject.name == “arrowRight”)
arrowHandler.ChangeSkin (“arrowRight”);
if (gameObject.name == “QuitButton”)
Application.Quit ();
}~~

}
If there was a better solution, I’d love to hear it. I also don’t know if I should’ve just edited my question instead of replying but I’m going to leave it open in case there are other solutions.