I’m pretty new to all this so I was messing with some code and I just can not find whats wrong with it, I keeping getting a error of it expecting a “}” on line 29 when I indeed have one, or am I overlooking something?
Looks like you accidentally hit Ctrl-B in your MonoDevelop at some point. That makes it compile the code internally, where it spotted the error, and you haven’t re-compiled in MonoDevelop since for it to notice that you’ve fixed it.
Now that you have fixed it, hit Ctrl-B again and the error flags should go away.
Just to be clear, you don’t need to compile in MonoDevelop. Unity compiles your code for itself. I know you probably didn’t do it on purpose (and it can’t hurt anything), but just a heads up in case. Unity’s console will flag errors for you as well, and double clicking them there will take you to their line in MonoDevelop.
Thank you for replying. Well as I was trying to figure out this error for myself I ended up debugging to try and figure out the problem by doing a trial and error session. Still no luck, the missing “;” was however a error, which is now fixed but I still have the main error I can’t get rid of. Heres a look at my Mono and Unity together showing the error:
Hehe, indeed. If that is in fact the whole script then it is in fact missing a ‘}’.
OnGUI has a closing brace, but NetworkManager does not.
In v3n0m0us’s defence, it’s quite possible that MonoDevelop either already had it (it’s included in the default template) or auto-closed the brace when he copied the code in.