Not getting a Debug.Log

I have a crafting script for some reason im not getting the Debug.Log(“Ammount1”), Debug.Log(“Add”), or Debug.Log(“Add1”), but i am getting Debug.Log(“Ammont”).

I think it has something to do with the brackets that i placed but because im pretty new to Unity and Javascript, I dont really know what way they should go. I think it is the Brackets because im its not subtracting the Ammount variables. If you know what the problem is or what i need to do to keep it working but rearrange the brackets please leave a comment or an answer!

I have left the section of the script below. I am sorry im not very knowledgeable in coding and Thank you in advance!

function Craft2 ()
{
	if(Crafting[2] == true)
{
Debug.Log("Ammount");

	if(Ammount[0] >=2 && Ammount[1] >=1)
{
	if(CraftingNumber >= NewTexture.Length)
{
Ammount[0]-=2;
Ammount[1]-=1;
Ammount[2]+=1;
Debug.Log("Ammount1");

	if(NewTexture[CraftingNumber] != Blank )
{
CraftingNumber ++;
Debug.Log("Add");
}

	if(NewTexture[CraftingNumber] == Blank )
{
NewTexture[CraftingNumber] == AllTextures[2];
Debug.Log("Add1");
}
}

if(CraftingNumber < NewTexture.Length)
{
CraftingNumber = 0;
Crafting[2] = false;
		}
	}
}
}

Your debugs are essentially based on passing your if() conditions, so that’s really the root cause and probably nothing to do with brackets/debug.log per se. The simplest way (without using steps in Mono) is just to put more debugs like after line 7 do debug.log (“passed ammount[0] and [1] check”) and then again on the next if, and so on. I think you’ll find your if() conditions aren’t working as expected

Make sure logging messages are enabled on the console…

All enabled looks like this

[25844-screen+shot+2014-04-27+at+9.20.44+pm.png|25844]

All disabled looks like this

[25845-screen+shot+2014-04-27+at+9.21.28+pm.png|25845]

Its a bit hard to see in those screen shots, but enabled is grey, disabled is black. If unsure, then click on them and pif they get darker, click again.