C
C#9mo ago
Fugi

help plz

Idk why is says this or how to fix.
No description
No description
15 Replies
Fugi
FugiOP9mo ago
I tried putting private and public infrastructure but there's just another issue with that so
mtreit
mtreit9mo ago
Create a new project that does not use the top level statements feature Top level statements (which is the default now) is just causing confusion. There's a checkbox when you create the project in Visual Studio. Or you can use --use-program-main if you use dotnet new CLI command
Fugi
FugiOP9mo ago
Uhhh, like an entire new game or smth? Sry I'm quite new to coding so I'm kinda clueless just trying to make a small platformer level for a test
mtreit
mtreit9mo ago
Just re-create a new blank project that doesn't use top level statements (check the box in the new project dialog) and then copy your code over
Fugi
FugiOP9mo ago
OK I think I understand. I'll try that Thx
mtreit
mtreit9mo ago
If that doesn't work, use $paste to show your full source code (photos of your monitor are hard to parse) and someone can help show what the issue is.
MODiX
MODiX9mo ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
Fugi
FugiOP9mo ago
$paste?
MODiX
MODiX9mo ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
Fugi
FugiOP9mo ago
ok i put my code into that but idk waht to do after taht
Pobiega
Pobiega9mo ago
You need to paste the link here. But your problem is most likely that you have put things outside the class braces for a mono behaviour I would highly recommend learning the basics of c# before doing unity
Angius
Angius9mo ago
C# is case-sensitive btw
No description
Angius
Angius9mo ago
This method in Unity is FixedUpdate(), not fixedUpdate() Far as fixing your error goes, remember that all methods must be within classes
Ghost4Man
Ghost4Man9mo ago
1. there's an extra semicolon after void fixedUpdate() 2. VS should underline all errors (like the misspelled Vecotr3 etc.); if it doesn't, you're probably not opening the project/script correctly 3. that one error message displayed in Unity is probably not enough to solve the problem, maybe there are more errors in the Console?
Fugi
FugiOP9mo ago
Ahhh thanks so much Yea I added the semi colen to see if that was the problem and it wasent I just forgot to remove it
Want results from more Discord servers?
Add your server