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 Laxity27 · Jan 19, 2014 at 04:37 PM · compiler errorcamera scriptcar tutorial

Why does it say You must Fix all compiler errors to enter play mode?

I have been having a problem with the code for the camera script in the Car Tutorial. It was telling me I had to add semicolons that were already there. I eventually fixed that problem and the Compiler errors at the bottom went away. So my camera script is perfect but when I try to enter play mode, it says, "All compiler errors must be fixed before you can enter play mode!" But I already fixed the problems and there aren't any errors to be fixed.

Comment
Add comment · Show 7
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 sheffieldlad · Jan 19, 2014 at 04:39 PM 0
Share

None can answer this question unless you post the code.

avatar image YoungDeveloper · Jan 19, 2014 at 04:42 PM 0
Share

Did you save it?

avatar image Invertex · Jan 19, 2014 at 04:43 PM 0
Share

There must still be some errors there... You sure that Error showing isn't deactivated by accident? check the 3 little buttons on the top right of your Console window.

avatar image Laxity27 · Jan 19, 2014 at 04:54 PM 0
Share
 #pragma strict
 var car : Transform;
 var distance : float = 6.4;
 var height float = 1.4;
 var rotationDamping : float = 3.0;
 var heightDamping : float = 2.0;
 var zoomRacio : float = 0.5;
 private var rotationVector : Vector3;
 function Start () {
 
 }
 
 function LateUpdate () {
 var wantedAngel = car.eulerAngels.y;
 var wantedHeight = car.position.y + height;
 var myAngel = transform.eulerAndels.y;
 var myHeight = transform.position.y;
 myAngel = $$anonymous$$athf.LerpAngle(myAngle,wantedAngle,rotationDamping*Time.deltaTime);
 myHeight = $$anonymous$$athf.Lerp(myHeight,wantedheight,heightDamping*Time.deltaTime);
 var currentRotation = Quaternion.Euler(0,myAngle,0);
 transform.position = car.position;
 transform.position -= currentRotation*Vector3.forward*distance;
 transform.LookAt (car);
 }
 function FixedUpdate  () {
 var acc = car.rigidbody.velocity.magnitude;
 Camera.fieldOfView = DefaultFOV + acc*zoomRacio*Time.deltaTime;
avatar image Laxity27 · Jan 19, 2014 at 04:55 PM 0
Share

Oh never $$anonymous$$d I found the errors, but it wants me to add a semicolon on the line var height float = 1.4; but I already put one there. i there anything else wrong with it?

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by tanoshimi · Jan 19, 2014 at 08:13 PM

You need to be a lot more careful about accuracy when you're coding. Just from a quick glance at the above code:

var height float = 1.4; should be var height : float = 1.4;

var wantedAngel should be var wantedAngle

eulerAngels.y; should be eulerAngles.y;

eulerAndels.y; should also be eulerAngles.y;

var myAngel should be var myAngle

wantedheight should be wantedHeight

...

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

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

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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Can someone help me fix my Javascript for Flickering Light? 6 Answers

Material doesn't have a color property '_Color' 4 Answers

Internal Compiler error...What happened?! 1 Answer

Setting Scroll View Width GUILayout 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