- Home /
Options menu errors
Hey guys!
I just typed this up earlier but it's giving me errors, I've tried following what it says (or at least what I think it's saying) in the console but to no luck.
It didn't format properly with the built in bit so here is a link: http://pastebin.com/WJATuAQ7
The errors are:
*Directory/Options.js(14,66): BCE0044: expecting ), found '{'.
*Directory/Options.js(20,66): BCE0044: expecting ), found '{'.
*Directory/Options.js(23,13): BCE0044: expecting EOF, found '{'.
Thanks in advance!
Answer by Piflik · Aug 22, 2012 at 07:08 PM
You are missing one closing bracket in every if statement. (just like your error message tells you)
if (GUI.Button (Rect (330, 70, 100, 20, "Full Size"))
should be
if (GUI.Button (Rect (330, 70, 100, 20, "Full Size")))
I tried doing that before but it says this about each if statement:
BCE0024: The type 'UnityEngine.Rect' does not have a visible constructor that matches the argument list '(int, int, int, int, String'
Oh, right...because I didn't look properly, I just counted the brackets. Really it should be:
if (GUI.Button (Rect (330, 70, 100, 20), "Full Size"))
Did you try it? You need on braccket to close the Rect, one to close the Button and one to close the If Statement. In your first code, you are missing the one for the Rect.