• 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 /
  • Help Room /
avatar image
Question by sourabhd · Jan 17, 2013 at 01:55 AM · bugmonodevelopbugsfoundexpected

Is this a bug in MonoDevelop? I do NOT see what is wrong

I keep getting the error "Assets/GameScripts/CarTorqueGenerator.js(85,1): BCE0044: expecting }, found ''."

As you can see that error says its on line 85 but I dont even have anyt$$anonymous$$ng on that line. My code stops at line 84. Tried copying and pasting it into a new .js but that came up with the same error. Google search gave no help so I came here.Any help at all would be appreciated.

Code:

 #pragma strict
 var wheelFrontLeft: GameObject;
 var wheelFrontRight: GameObject;
 var wheelBackLeft: GameObject;
 var wheelBackRight: GameObject;
 var wheelFrontLeftTorque: int=100;
 var wheelFrontRightTorque: int=100;
 var wheelBackLeftTorque: int=100;
 var wheelBackRightTorque: int=100;
 var wheelTurnRotationAF: float= 1.571;
 
 function Start () {
 
 }
 
 function Update () {
 if (Input.GetKeyDown("w"))    {
     wheelFrontRight.constantForce.enabled=true;
     wheelFrontLeft.constantForce.enabled=true;
     wheelBackRight.constantForce.enabled=true;
     wheelBackLeft.constantForce.enabled=true;
     wheelFrontRight.constantForce.relativeTorque= Vector3(0,1,0)*wheelFrontRightTorque;
     wheelFrontLeft.constantForce.relativeTorque= Vector3(0,1,0)*wheelFrontLeftTorque;
     wheelBackRight.constantForce.relativeTorque= Vector3(0,1,0)*wheelBackRightTorque;
     wheelBackLeft.constantForce.relativeTorque= Vector3(0,1,0)*wheelBackLeftTorque;
 
     }
 if (Input.GetKeyUp("w"))    {
 
     wheelFrontRight.constantForce.enabled=false;
     wheelFrontLeft.constantForce.enabled=false;
     wheelBackRight.constantForce.enabled=false;
     wheelBackLeft.constantForce.enabled=false;
 
     }
 if (Input.GetKeyDown("s"))    {
 
     wheelFrontRight.constantForce.enabled=true;
     wheelFrontLeft.constantForce.enabled=true;
     wheelBackRight.constantForce.enabled=true;
     wheelBackLeft.constantForce.enabled=true;
     wheelFrontRight.constantForce.relativeTorque= Vector3(0,1,0)*wheelFrontRightTorque*-1;
     wheelFrontLeft.constantForce.relativeTorque= Vector3(0,1,0)*wheelFrontLeftTorque*-1;
     wheelBackRight.constantForce.relativeTorque= Vector3(0,1,0)*wheelBackRightTorque*-1;
     wheelBackLeft.constantForce.relativeTorque= Vector3(0,1,0)*wheelBackLeftTorque*-1;
 
     }
 if (Input.GetKeyUp("s"))    {
 
     wheelFrontRight.constantForce.enabled=false;
     wheelFrontLeft.constantForce.enabled=false;
     wheelBackRight.constantForce.enabled=false;
     wheelBackLeft.constantForce.enabled=false;
 
     }
 
 if (Input.GetKeyDown("d"))    {
 
     wheelFrontRight.constantForce.enabled=true;
     wheelFrontLeft.constantForce.enabled=true;
     wheelFrontRight.transform.RotateAroundLocal(Vector3.right, wheelTurnRotationAF*Time.deltaTime);
     wheelFrontLeft.transform.RotateAroundLocal(Vector3.right, wheelTurnRotationAF*Time.deltaTime);
     if (wheelFrontRight.transform.localRotation.eulerAngles(Vector3(0,45,0)))    {
     
     wheelFrontRight.constantForce.enabled=false;
     wheelFrontLeft.constantForce.enabled=false;
     
     }
     
     }
 
 if (Input.GetKeyDown("a"))    {
 
     wheelFrontRight.constantForce.enabled=true;
     wheelFrontLeft.constantForce.enabled=true;
     wheelFrontRight.transform.RotateAroundLocal(Vector3.right, wheelTurnRotationAF*Time.deltaTime*-1);
     wheelFrontLeft.transform.RotateAroundLocal(Vector3.right, wheelTurnRotationAF*Time.deltaTime*-1);
     if (wheelFrontRight.transform.localRotation.eulerAngles(Vector3(0,-45,0)))    {
     
     wheelFrontRight.constantForce.enabled=false;
     wheelFrontLeft.constantForce.enabled=false;
     
     }
     }
Comment

People who like this

0 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 afriendlycow · Nov 28, 2017 at 12:08 AM 0
Share

LOLS! I hate it when I do noobie 101 mistakes too. As my reacted would be palm face sigh. I feel your pain. xD

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Lovrenc · Jan 17, 2013 at 01:58 AM

You are missing } at the end. You didn't close Update method.

Comment
FeeeshMeister
afriendlycow
dragon_script

People who like this

3 Show 0 · 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

Answer by sourabhd · Jan 17, 2013 at 02:16 AM

Dang it -_- rookie mistake. Thanks!

Comment
afriendlycow

People who like this

1 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 Lovrenc · Jan 17, 2013 at 02:18 AM 2
Share

Happens.

For future endouvers on this page:

a)Use comments to comment (e.g. this should not be written under an answer as it is not an answer to the question.
b)Tick answer if it was correct and helped you solve your problem.

avatar image dubbreak · Feb 16, 2013 at 06:01 AM 1
Share

Also up voting the answer doesn't hurt either ;).

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

14 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 avatar image

Related Questions

Can someone explain this, i dont know what happend???????????????? 0 Answers

Bug of light and emissive which disappears according to the rotation of the camera. 1 Answer

Monodevelop not opening in 2018.2.16f1 1 Answer

unity start but doesnt open 0 Answers

Big bug in all materials 0 Answers


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