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 /
This question was closed Mar 31, 2013 at 12:34 PM by Fattie for the following reason:

Duplicate Question

avatar image
0
Question by inglipX · Mar 30, 2013 at 09:47 PM · errorifelse

Why am i getting this error?!

Assets/Scripts/breathingSystem.js(17,1): BCE0044: expecting EOF, found 'else'.

 var movingSound : AudioClip;
 var idleSound : AudioClip;
 var isMoving : boolean = false;
 var isIdle : boolean = true;
 
 function Start ()
 {
 if(Input.GetKeyDown("Vertical") || Input.GetKeyDown("Horizontal"))
 
     isIdle = false;
     isMoving = true;
     audio.clip(movingSound);
     audio.Play();
 
 
 }
 else if(Input.GetKeyUp("Vertical") || Input.GetKeyUp("Horizontal"))
 {
 
     isIdle = true;
     isMoving = false;
     audio.clip(idleSound);
     audio.Play();
 
 }
Comment
Add comment · Show 1
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 AlucardJay · Mar 31, 2013 at 04:41 AM 1
Share

These are all duplicate questions :

  • http://answers.unity3d.com/questions/428154/why-am-i-getting-this-error-2.html

  • http://answers.unity3d.com/questions/428203/if-var-true-do-something-not-being-detected.html

  • http://answers.unity3d.com/questions/428237/audio-says-it-is-playing-in-audiosource-but-is-not.html

@inglipX : Do Not Post Duplicate Questions

Watch : http://video.unity3d.com/video/7720450/tutorials-using-unity-answers

2 Replies

  • Sort: 
avatar image
1

Answer by Unitraxx · Mar 30, 2013 at 09:50 PM

at the end of line 8 should be a {

And you also miss one { at the end of your file to close the Update() function

Comment
Add comment · Show 1 · 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 inglipX · Mar 30, 2013 at 09:52 PM 0
Share

huh? there is no { at line 17

avatar image
0
Wiki

Answer by DryTear · Mar 30, 2013 at 10:40 PM

heres the layout of a javascript:

 var Thing : Transform;

 function Update() 
 {
     if(Thing.name == "Thing")
     {
         Destory();
     }
     else
     {
         Destroy(Thing.gameObject);
     }
 }

if you follow the structure it can help you

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

Follow this Question

Answers Answers and Comments

13 People are following this question.

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

Related Questions

Multiple Cars not working 1 Answer

'else' not working.... please help:( 4 Answers

varification error in editor script 1 Answer

Wall Issue 1 Answer

IF - ELSE Issue! (Help! I'm new to this) 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