Cannot implicity convert type 'float' to 'int'. An explicit conversion exists (are you missing a cast?)

I’m very new to Unity, especially coding. I know I’m doing something wrong in the script but I don’t know what. This is me trying to make a clicker tutorial. The two scripts are supposed to work together.

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Buttonclicker : MonoBehaviour {

public int NumberOfClicks = 0;
public Text ScoreText = null;
public Text ClickPowerLabel = null;
public int ClickPower= 1;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
	ScoreText.text = NumberOfClicks.ToString();
	ClickPowerLabel.text = "ClickPower: " + ClickPower.ToString();

}
public void OnButtonClicked()
{
	NumberOfClicks = NumberOfClicks + ClickPower;

}
public void OnClickPowerPurchased()
{
	ClickPower = ClickPower +1;
}

}


using UnityEngine;
using System.Collections;

public class UpgradeManager : MonoBehaviour {

public Buttonclicker click;
public UnityEngine.UI.Text itemInfo;
public float cost;
public int count = 0;
public int clickPower;
public string itemName;
private float _newCost;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
	itemInfo.text = itemName + "

Cost: " + cost + "
Power: +" +clickPower;
}

public void PurchasedUpgrade() {
	if (click.ClickPower >= cost) {
		click.ClickPower -= cost;
		count += 1;
		click.ClickPower += clickPower;
		cost = Mathf.Round(cost * 1.15f);
		_newCost = Mathf.Pow (cost, _newCost = cost) ;
	}
}

}

Ah, changing all the int’s to floats worked. Thank you. Though I am not exactly sure what a float is exactly. I’m kinda ahead of my class. I decided to try to challenge myself :slight_smile: