Aaron Chen
Aaron Chen

Reputation: 11

How do i fix the gravity body on the unity script C# code?

I am trying to make a game with a friend this error came we have no idea how to fix since we are beginners.

Upvotes: 0

Views: 41

Answers (1)

Pac0
Pac0

Reputation: 23174

In C#,

xxx. = yyy;

is not valid.

it would make sense if you have :

xxx.aaa = yyy;

so the compiler tells you "I'm expecting some name after the dot, like aaa". This name is called an indentifier, hence the error you get.

This would mean : set the property/field named aaaof xxx with the value of yyy

I think you can simply remove the dot.

xxx = yyy;

(set the value of xxx as yyy)

Upvotes: 1

Related Questions