crafting problem

So i wont to make it so when i press the furnace button if the variable stone is equal or over 15 the value of the furnace variable increases by one but what has been happening is the furnace variable just constantly increases

sorry if its confusing im not good with asking questions and obviosly i will do the same with all the other ones and im new to coding :stuck_out_tongue:

var wood = 0;
var stone = 0;
var steel_ore = 0;
var glock = 0;
var furnace = 0;
var oil_rig = 0;
var assult_rifle = 0;
var ammo = 0;
var bow = 0;
var arrows = 0;



//lables
function OnGUI(){
 
   GUI.Label(Rect(10,10,100,20), "wood =" + wood.ToString() );
   GUI.Label(Rect(10,22,100,20), "stone =" + stone.ToString() );
   GUI.Label(Rect(10,34,100,20), "Steel ore =" + steel_ore.ToString() );
   GUI.Label(Rect(10,46,100,20), "glock =" + glock.ToString() );
   GUI.Label(Rect(10,58,100,20), "furnace =" + furnace.ToString() );
   GUI.Label(Rect(10,70,100,20), "oil rig =" + oil_rig.ToString() );
   GUI.Label(Rect(10,82,100,20), "assult rifle =" + assult_rifle.ToString() );
   GUI.Label(Rect(10,94,100,20), "ammo =" + ammo.ToString() );
   GUI.Label(Rect(10,106,100,20), "bow =" + bow.ToString() );
   GUI.Label(Rect(10,118,100,20), "arrows =" + arrows.ToString() );
   GUI.Label(Rect(1200,10,100,20), "crafting" );
   
   //crafting
   
   
   		if(GUI.Button(Rect(1200,30,100,20), "furnace"));{
   				if (stone == 15);{
   				furnace = furnace + 1;
   				
   			}
   		}
   }

Like others already said you need to remove your semicolons after your if statements. Also it’s not clear if your wood / stone /… variables are your available resources or the content of some kind of crafting grid. From the comment above it seems it’s your available resources. In this case it makes no sense to compare “stone” to 15.

Imagine you have 20€ and want to buy something for 15€, but you can’t because 20 does not equal 15. You juse have to check if you have enough resources.

Also when crafting a furnace you probably want to “use” the required amount of resources. Something like that:

if(GUI.Button(Rect(1200,30,100,20), "furnace"))
{
    if (stone >= 15)
    {
        furnace = furnace + 1;
        stone -= 15;
    }
}