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 Ryan Mayer · Jan 31, 2011 at 03:48 AM · errorcs8025

What Does error mean : i got it from this line of script......

Assets/textures/NewBehaviourScript 1.cs(4,6): error CS8025: Parsing error

Scipt:

public class Mission : MonoBehaviour

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Peter G · Jan 31, 2011 at 03:57 AM

Besides for the fact that you spelled "Scipt" wrong ;), it is more than likely one of two things.

  • Make sure that you have a bracket after MonoBehaviour. It could be on the next line though, that's fine.

  • Maybe you left out a semi-collon ";" after using SoAndSo;

  • Look around the line too. Sometimes the compiler doesn't give the actual line the error is on because an error before it confused its line numbering.

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 Ryan Mayer · Jan 31, 2011 at 04:04 AM 0
Share

ok but can you look to heres the script

using UnityEngine; using System.Collections; public int $$anonymous$$ission public class $$anonymous$$ission : $$anonymous$$onoBehaviour { static public int Count; private const int Required$$anonymous$$illAmount = 10;

 void Update()
 {
     if (Count >= Required$$anonymous$$illAmount)
     {
         // $$anonymous$$ission complete
     }
 }

}

avatar image Jesse Anders · Jan 31, 2011 at 11:10 AM 3
Share

It looks like you're trying to declare a variable outside of the class definition. (Also, the variable shares a name with the class, and the declaration is missing a semicolon, but the error is probably due to its being declared outside the class.)

avatar image
0

Answer by SisterKy · Aug 10, 2011 at 07:18 PM

I know this is an old-and-abandoned question, sorry to dig it up; but I stumbled upon this and it bothered me... ^^'

using UnityEngine; 
using System.Collections; 
public int Mission //<------- PROBLEM
public class Mission : MonoBehaviour 
{ 
  static public int Count; private const int RequiredKillAmount = 10;
  void Update()
  {
    if (Count >= RequiredKillAmount)
    {
        // Mission complete
    }
  }
}
3 problems at the noted line!

1) as Peter stated, missed a ' ; ' above the line of class-declaration.
2) can't have a variable-declaration outside a class.
3) shouldn't name a variable the same as a class. (use lower case!)

Maybe you tried to give the class a return-value? I don't think that's possible at all (?), but certainly not with this syntax...

Greetz, Ky.

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

1 Person is following this question.

avatar image

Related Questions

CS8025 Parser error 2 Answers

Parsing error on MeleeSystem script 0 Answers

Script Errors with C# 1 Answer

Errors CS1525 and CS8025.... 1 Answer

Unexpected Symbol and Parsing Errors 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