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 Davon · Dec 12, 2010 at 03:54 AM · errorparsingcs8025

Parsing error with my code

I have an error with my code, its Assets/Scripts/Player Script.cs(4,26); error CS8025; Parsing error.

my code

using UnityEngine; using System.Collections;

public class Player Script : MonoBehaviour {

public float moveSpeed = 5.0f; public int life = 100; public int maxLife = 100; public float rotateSpeed = 50; public Transform world;

// public PanningBackground back;

public int damage = 10; // Update is called once per frame void Update () {

 Vector3 mVec = new Vector3(0, 0, -Input.GetAxis("Vertical"));

 float rot = Input.GetAxis("Horizontal");

 //print ((Vector3.up) * rot * rotateSpeed);
 transform.Rotate(Vector3.up * (rot * rotateSpeed * Time.deltaTime));

 transform.Translate(mVec * moveSpeed * Time.deltaTime);
 mVec = transform.TransformDirection(mVec);

 // bacs.currentPan += new Vector2(mVec.x,mVec.z) * Time.deltaTime;

 world.Translate(mVec * moveSpeed * Time.deltaTime);



}

}

It doesn't make much sense to me why the parsing error is occurring but

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

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by uhahaha · Dec 12, 2010 at 04:10 AM

I don't see any error in your code. Just change

public float rotateSpeed = 50;

to

public float rotateSpeed = 50.0f;

and see if you still get the error.

Comment
Add comment · Show 4 · 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 uhahaha · Dec 12, 2010 at 04:13 AM 0
Share

Woophs I didn't see Justin's answer while I was answering.

avatar image Davon · Dec 12, 2010 at 05:33 AM 0
Share

Nothing.

That didn't help, it gave me another error the importer for asset Assets / Scripts / Player Script.cs ($$anonymous$$onoImporter) did not generate a $$anonymous$$D4 digest/

:(

avatar image Justin Warner · Dec 12, 2010 at 05:56 AM 0
Share

Sounds like a different problem, I recomend starting a new question for it... And it's fine loginuhahaha =) you helped anywayssss!

avatar image Davon · Dec 12, 2010 at 06:33 AM 0
Share

Its still not working sigh. And now I get it, even if I scrap that code.

The other error I know why it happened

avatar image
0

Answer by Justin Warner · Dec 12, 2010 at 03:55 AM

Put an f after 50 on line 4... You need to make that number a float =). Notice how you have that for line one...

Have a good night!

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
0

Answer by Davon · Dec 12, 2010 at 07:56 AM

wow fixed.

Brackets in the wrong spots...

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

No one has followed this question yet.

Related Questions

Jukebox parsing error 2 Answers

CS8025 parsing error, can't find, halp ! 0 Answers

unity 3d - c# scripting problems 1 Answer

Script Errors with C# 1 Answer

Errors CS1525 and CS8025.... 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