I have created a function were I loop through some gameObjects and change an int if it's not 0. The strange thing is, some of the parts stop working when I add brackets for better readability. I'm currently using the code below, but would like that extra readability and efficiency when calling the function.

```
WetStepCycle(leftFoot, lfHit);
if (wetStepsRemainingLeft != 0) wetStepsRemainingLeft--;

private void WetStepCycle(Transform footTransform, RaycastHit footHit)
    {
        if (currentActive == wetStepDecals.Length - 1) currentActive = 0;
        else
        currentActive++;
        wetStepDecals[currentActive].transform.position = new Vector3(footTransform.position.x, footHit.point.y, footTransform.position.z);
        wetStepDecals[currentActive].transform.eulerAngles = footTransform.transform.eulerAngles;
    }

```

This is working like a charm, but not very compact, I would like the substracting the int within the function.

```
private void WetStepCycleTest(Transform footTransform, RaycastHit footHit, int sCounter)
    {
        if (currentActive == wetStepDecals.Length - 1)
        {
            currentActive = 0;
        }
        else
        {
            currentActive++;
            wetStepDecals[currentActive].transform.position = new Vector3(footTransform.position.x, footHit.point.y, footTransform.position.z);
            wetStepDecals[currentActive].transform.eulerAngles = footTransform.transform.eulerAngles;
            if (sCounter != 0)
            {
                sCounter--;
                Debug.Log("Minus");
            }
        }
    }

```

This for some reason isn't working and I think it has something to do with formatting. This way the sCounter isn't substracted and for some reason the first item of the gameObject array isn't used. I think it has to do with doing currentActive++ and sCounter--;, but changing them to += 1 and -= 1 doesn't seem to work either.