• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by ErAs · Dec 22, 2011 at 10:09 PM · errorfpsgamemenu

[Closed] MainMenu Script error

Hello! I am trying to make a MainMenu for my game, then i saw this error on my console. i have been trying to find a solution for an hour, but i just get more and more errors.

Error:Assets/scripts/MyGraphics(MyMenuCNT).js(25,30):BCE0044: expecting :, found '='

Please Help!

Comment

People who like this

0 Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Grady · Dec 22, 2011 at 11:49 PM 0
Share

can you please post that script???!!!!

avatar image ErAs · Dec 23, 2011 at 04:10 PM 0
Share

This is the script that wont work:

var buttonColor : Color = Color.blue;

var BackgroundColor : Color = Color.blue;

var Horizslidervalue : float = 0.0;

function OnGUI (){

GUI.contentColor = buttonColor;

GUI.backgroundColor = BackgroundColor;

if(GUI.Button (Rect ((Screen.width/2)-350,(Screen.height/2)-50,80,20), "Graphic Settings")) {

QualityOn();}

if(chooseQuality){

GUI.Label(Rect ((Screen.width/2)-200,(Screen.height/2) - 100,100,40), "Quality Settings");

GUI.Button (Rect ((Screen.width/2)-400,(Screen.height/2)-50,80,20), "SuperLow");{

QualitySettings.currentLevel = QualityLevel.Fastest;

chooseQuality = false;}

GUI.Button (Rect ((Screen.width/2)-400,(Screen.height/2)-100,80,20), "Low");{

QualitySettings.currentLeve = QualityLevel.Simple;

chooseQuality = false;}

GUI.Button (Rect ((Screen.width/2)-400,(Screen.height/2)-150,80,20), "Medium");{

QualitySettings.currentLevel = QualityLevel.Good;

chooseQuality = false;}

GUI.Button (Rect ((Screen.width/2)-400,(Screen.height/2)-200,80,20), "High");{

QualitySettings.currentLevel = QualityLevel.Fantastic;

chooseQuality = false;}

if(GUI.Button (Rect ((Screen.width/2)-350,(Screen.height/2)-50,80,20), "Graphic Settings")) {

AudioOn();}

if(audiochanger){

GUILayout.Label("AudioVolume");

Horizslidervalue = GUI.HorizontalSlider (Rect (25,25,100,30), Horizslidervalue,0.0,10.0);}

}

function QualityOn (){

audiochanger = false;

chooseQuality = true;

}

function AudioOn (){

audiochanger = true;

chooseQuality = false;

}

avatar image ErAs · Jan 13, 2012 at 08:22 PM 0
Share

Someone please answer, i am tired of trying to think myself :(

2 Replies

  • Sort: 
avatar image

Answer by BiG · Dec 23, 2011 at 04:13 PM

Search for this string in your code:

QualitySettings.currentLeve = QualityLevel.Simple;

Anything strange? Yes, you've forgotten a "l", and it must be

QualitySettings.currentLeve*l* = QualityLevel.Simple;

Comment
gamberetto
Lo0NuhtiK

People who like this

2 Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image BiG · Dec 23, 2011 at 04:15 PM 0
Share

BTW, that's the 15° line, following the formatting above.

avatar image ErAs · Dec 23, 2011 at 06:57 PM 0
Share

It didnt work, the same error is there even if i add the "l"

avatar image

Answer by sketchers1 · Dec 23, 2011 at 04:38 PM

var buttonColor : Color = Color.blue;

var BackgroundColor : Color = Color.blue;

var Horizslidervalue : float = 0.0;

function OnGUI (){

GUI.contentColor = buttonColor;

GUI.backgroundColor = BackgroundColor;

if(GUI.Button (Rect ((Screen.width/2)-350,(Screen.height/2)-50,80,20), "Graphic Settings")) {

QualityOn();}

if(chooseQuality){

GUI.Label(Rect ((Screen.width/2)-200,(Screen.height/2) - 100,100,40), "Quality Settings");

GUI.Button (Rect ((Screen.width/2)-400,(Screen.height/2)-50,80,20), "SuperLow");{

QualitySettings.currentLevel = QualityLevel.Fastest;

chooseQuality = false;}

GUI.Button (Rect ((Screen.width/2)-400,(Screen.height/2)-100,80,20), "Low");{

QualitySettings.currentLeve = QualityLevel.Simple; chooseQuality = false;}

GUI.Button (Rect ((Screen.width/2)-400,(Screen.height/2)-150,80,20), "Medium");{

QualitySettings.currentLevel = QualityLevel.Good;

chooseQuality = false;}

GUI.Button (Rect ((Screen.width/2)-400,(Screen.height/2)-200,80,20), "High");{

QualitySettings.currentLevel = QualityLevel.Fantastic;

chooseQuality = false;}

if(GUI.Button (Rect ((Screen.width/2)-350,(Screen.height/2)-50,80,20), "Graphic Settings")) {

AudioOn();}

if(audiochanger){

GUILayout.Label("AudioVolume");

Horizslidervalue = GUI.HorizontalSlider (Rect (25,25,100,30), Horizslidervalue,0.0,10.0);}

}

function QualityOn (){

audiochanger = false;

chooseQuality = true;

}

function AudioOn (){

audiochanger = true;

chooseQuality = false;

}

thats also the only mistake i found. i made it bold so you can find it. just add the l and you should be ready to roll! :)

Comment

People who like this

0 Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ErAs · Dec 23, 2011 at 06:57 PM 0
Share

It didnt work, the same error is there even if i add the "l"

avatar image sketchers1 · Dec 23, 2011 at 09:10 PM 0
Share

what error is it giving now?

avatar image ErAs · Dec 24, 2011 at 11:52 AM 0
Share

The same :

Assets/scripts/MyGraphics(MyMenuCNT).js(25,30):BCE0044: expecting :, found '='

avatar image sketchers1 · Jan 13, 2012 at 08:46 PM 0
Share

i cant figure out what the problem is....

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Error BCE0051: Operater '==' cannot be used. Please Help! 1 Answer

what is wrong with this online FPS script(not done) ? 1 Answer

Multiplayer Script error 2 Answers

error with footsteps script 1 Answer

Bullet Fire script not working 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges