[Closed] Help with IF statement and conditions C#

i’m getting back error messages all the time, i’ve tried different things but still no luck… any ideas?

void Update () {
if (fire_counter.heatingcounter <= 99() &  (fire_counter.in_heat=0())
	    {
	    Debug.log("its working");
	}

the error message is about these> “{”
i’ve taken them out but still no joy.

Your curly braces don’t match. Also, your equal sign assigns. You want == to compare.
Try something more like this


void Update()
            {
                if (fire_counter.heatingcounter <= 99 && fire_counter.in_heat == 0)
                {
                    Debug.log("its working");
                }
            }

At start upvoted first comment under your question but then after your reply I just couldn’t stand on side.

First of all you should go learn C# basics seriously.

Secondly if I get it right what you want then change your code on this:

void Update()
{
    if (fire_counter.heatingcounter <= 99 && fire_counter.in_heat == 0)
    {
        Debug.Log("its working");
    }
}

void Update ()
{
if (fire_counter.heatingcounter <= 99 && fire_counter.in_heat == 0)
{
Debug.log(“its working”);
}
}

http://csharp.net-tutorials.com/basics/if-statement/

http://www.completecsharptutorial.com/

http://unity3d.com/learn/tutorials/modules/beginner/scripting