Error CS0201

error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

My Codes: https://gist.github.com/unikiddy/5b027809fd0beb53f11983e2d2aa0508

It looks like you’re not assigning your variables correctly.
Line 17 should probably be heath == maxHealth, line 26 should be thirst -= thristIncreaseRate * Time.deltaTime etc.

Hope that helps.

1 Like

Please be aware that you can also just copy/paste you code directly into the forum and then just apply the code formatting characters both before and after it, this makes it a lot easier for those who offer to help you.


See also;

Privacy & Terms