Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
0
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
Add comment · 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), "$$anonymous$$edium");{

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

· Add your reply
  • Sort: 
avatar image
2

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
Add comment · 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
0

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
Add comment · 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/$$anonymous$$yGraphics($$anonymous$$y$$anonymous$$enuCNT).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....

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

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

Main Menu Script Issues 1 Answer

Creating Fps Game Menu 2 Answers

FPS weapon sway script error 0 Answers

Error... that I don't understand. 3 Answers

GUI Scale Problem 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