Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 /
  • Help Room /
avatar image
0
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 anything 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
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 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
3
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
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
avatar image
1

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

Dang it -_- rookie mistake. Thanks!

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 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.

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

It seems that Unity 5.4.1 has bug !!! 0 Answers

Is this a bug or im doing something wrong? 2 Answers

Editor is Broken 1 Answer

Sprite Editor bugged on updated project 0 Answers

SetParent/setting transform parents leads to unpredictable and random scaling of decals 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