"Script2" will not update variable in "Script1" (No error messages)

I have a controller script that controls a stamina bar…

using UnityEngine;
using System.Collections;

public class StaminaScript : MonoBehaviour {
	
	public Texture2D staminaGuiTex;
	public Texture2D staminaBlueTex;
	public float currTime;
	public static float staminaScale;
	
	// Use this for initialization
	void Awake () {
		currTime = Time.time;
		staminaScale = 221;
	}
	
	// Update is called once per frame
	void Update () {
		if (Input.GetKey (KeyCode.LeftShift) | Input.GetKey (KeyCode.RightShift)){
			if(currTime < Time.time){
				if(staminaScale != 0){
					staminaScale -= 0.25f;
				}
				currTime = Time.time;
			}
		}
	}
	
	public void OnGUI() {
		GUI.DrawTexture(new Rect(Screen.width - 300, 94, 256, 64), staminaGuiTex, ScaleMode.StretchToFill, true, 0);
		
		GUI.DrawTexture(new Rect(Screen.width - 283, 116, staminaScale, 18), staminaBlueTex, ScaleMode.StretchToFill, true, 0);
	}
}

and I need this script to change add to it after the victim is attacked…

<if (((num <= this.biteDistance) && Input.GetButtonDown("Jump")) || (num2 <= this.biteDistance))
        {
            GUIKills.numberOfKills++;
			StaminaScript.staminaScale = (StaminaScript.staminaScale + 221 * (25/221));
            this.status = AIStatus.Attacked;

However, no matter if I use a static variable or not, no error messages appear, but the staminaScale variable doesn’t update. Any suggestions?

EDIT: There is a third Script I try to change the variable and it works…

enter code herevoid Update () 
	{
		if(!died&&(GameController.health <= 0))
		{
			//StaminaScript staminaScript = GameObject.FindGameObjectWithTag("Stam").GetComponent<StaminaScript>();
			StaminaScript.staminaScale = 221;
			Die();	
		}
		if(Input.GetButtonDown("Jump"))
		{
			gameObject.audio.PlayOneShot(audio.clip);	
		}
	}

That’s simply because this expression evaluates to 0:

(25/221)

25 and 221 are integer values. When you divide an integer by an integer the result will be also an integer. 25 / 221 is 0.1131 which will be trucated to 0

Use float literals. Either:

25.0f / 221.0f

or just

25f / 221f

I prefer the first one because it’s more obvious that it’s a float.

ps: Never ever compare float values to a certain value unless you set it to this explicit value. This statement will probably never be false:

if(staminaScale != 0)

use a range instead:

if(staminaScale > 0)

Also if you don’t want it to go below 0 you can clamp it wither with Mathf.Max or if you also have a maximum with Mathf.Clamp

staminaScale = Mathf.Max(staminaScale, 0.0f); // keep it above or equal to 0

staminaScale = Mathf.Clamp(staminaScale, 0.0f, 100.0f); // keep it between 0 and 100