[SOLVED] Getting error CS0201

After i finished coding the last bit with the else if statements it gives me this error.

Assets/Scripts/NumberWizard.cs(36,4): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement.

Steps Taken:
I have compared my code with the code in the resources
I have checked my versions im using Unity 5 so i checked the differences couldn’t find anything there.

My code:


In your Update() method you have the following line;

guess (max + min) / 2;

It should actually read;

guess = (max + min) / 2;

Hope this helps :slight_smile:

Wow thanks Rob such a simple mistake Thanks for the help😀

1 Like

You’re more than welcome Jamie, and don’t worry, we all make them :slight_smile:

Privacy & Terms