• Unity
  • Services
  • Made with Unity
  • Learn
  • 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
  • Forums
  • Answers
  • Feedback
  • Issue Tracker
  • Blog
  • Evangelists
  • User Groups

Navigation

  • Home
  • Unity
  • Industries
  • Made with Unity
  • Learn
  • Community
    • Forums
    • Answers
    • Feedback
    • Issue Tracker
    • Blog
    • Evangelists
    • User Groups
  • Get Unity
  • Asset Store

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

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.

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

Random image appears in the center of the screen while using scrollrect 1 Answer

How to resolve the loading glish of assassin's creed syndicate (PC) 0 Answers

unity start but doesnt open 0 Answers

Big bug in all materials 0 Answers

iPhone 5 distorted 3D models 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges