Im receiving this error when working with this code
Often I have trouble that when he says that something should pop up in VScode that I have to hand type them. I wonder if this is affecting this at all or if my problem lies elsewhere.
Im receiving this error when working with this code
Often I have trouble that when he says that something should pop up in VScode that I have to hand type them. I wonder if this is affecting this at all or if my problem lies elsewhere.
Nevermind I figured out that the double equals within the if statements were causing this issue.
There are 2 issues:
hasNectar == true;
inside the if statement (as you have discovered), but you are also setting hasNectar
to false
if (other.tag == "Flower" && hasNectar = false) // <-- here
you need ==
when checking and =
when assigning
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.