The code I’m working on from a udemy course is not working and I’m getting lots of errors.
Currently on Lecture 32 if your wondering.
(Unity Version 4.6.9 if that is important.)
You are missing closing bracket at line 24.
About the rest have no idea why it is happening. I done same course and never had such problems.
You forgot a “)” before “{” line 24
Where does the bracket go on line 24 does it go at the start or underneath a certain word.
Directly after ‘Sheets_0’ should be a closing parenthesis ‘)’.
Just for future reference, always check the line where the first error occurs, all following errors may just be a side effect of the first syntax error.
This fixes nothing and just gives me a different error:
Error CS1520: Class, struct, or interface method must have a return type
How dare you!
We did indeed fix your error. What you are getting is something different and is not our fault.
Im out.
EDIT: We need more info if you actually want help. Does it say what script it is?
next time copy and paste the code in the “code format” in the toolbar.
void Update()
{
print(myState);
if(myState == States.cell)
{
state_cell();
}
else if(myState == States.sheets_0) // forgot an " ) " at the end.
{
state_Sheets_0();
}
}
and here is your fix…
“at line 9” in the “else if” statement you forgot an " ) "
Guys, please. Read his message, he has a different error now.
oh, when i wrote. the message what he posted was not updated… my bad ![]()

