So I’ve been getting some help on Unity Answers about inputting yield and coroutines in my code. (Yield Script Update Error - Questions & Answers - Unity Discussions)

Right now, the start of my code looks like this.

	void Start ()
	{
		OSCHandler.Instance.Init ();
		servers = new Dictionary<string, ServerLog> (); 
		particleSystem.emissionRate = 0;
		 StartCoroutine(BongoClap());
	}
	
	
	IEnumerator BongoClap () {
	while (true) {
        // Rest of my code...

However, now I’m getting an error.

Assets/Scripts/UnityOSC-master/BoncoClapScript.cs(78,51): error CS0019: Operator ||' cannot be applied to operands of type bool’ and `UnityEngine.KeyCode’

It seems to be having a problem with the || operators in this line of code…

	if (Input.GetKeyDown (KeyCode.JoystickButton0) || (KeyCode.JoystickButton1) || (KeyCode.JoystickButton2) || (KeyCode.JoystickButton3)) {
						yield return new WaitForSeconds(5.0f);
     
					yield return null;
					}

Any idea why this might be happening? :S

You need an Input.GetKeyDown around the or condition:

 if (Input.GetKeyDown (KeyCode.JoystickButton0) || Input.GetKeyDown(KeyCode.JoystickButton1) ||  Input.GetKeyDown(KeyCode.JoystickButton2) || (KeyCode.JoystickButton3))