0 votes
by (8.2k points)

Now Visual studio is giving the Invalid token error on the assignment sign (=) (as per the title), and I can not see why.

  • error CSI 519: Invalid token in class, record, struct, or interface member declaration.
  • Invalid token '(' in class, record, struct, or interface member declaration.
  • Tuple must contain at least two elements.
  • Invalid token in class, record, struct, or interface member declaration.

1 Answer

0 votes
by (8.2k points)

It looks like this error happens due to version of your MSBuild, an old version of MSBuild can only compile C# version 4.
error happens due to wrong use of argument in line number 21.

In line 21                      if(other.gameObject.name = "Ball").
Replace the code with if(other.gameObject.name == "Ball").
 

TechXR runs courses in AR / VR / Metaverse / Game Development. Some of the popular Q&A in our courses are available here for easy discovery.

113 questions

117 answers

58 comments

105k users

...