Hello,
I have this script that gets an amount of gold and shows you how much money its worth if you convert it.
When the input field has a value it will store it as a string and the value of gold is 1000/gold bar. Then it should take the user input and multiple the 1000. However int.Parse() is not working…
if(inputText.text != null)
{
string amountOfGold = inputText.text;
int goldValue = 1000;
int total = goldValue * int.Parse(amountOfGold);
money.text = total.ToString();
gold.text = amountOfGold;
money.text = "$" + total;
}