• 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 monty · Apr 22, 2011 at 02:01 PM · syntax-errorbce0043eofunexpected-token

what is an unexpected token

i keep getting error messages saying there is an unexpected token in a script i am using. does anyone know what t$$anonymous$$s means and how to get rid of it and could you plz explain it to me in simple terms cos i am a bit of a noob with java.

here is the script with the problems

using; UnityEngine; using; System.Collections.Generic;

public class Decal MonoBehaviour { static; public int dCount;

 //The gameObjects that will be affected by the decal.
 [HideInInspector];
 public GameObject[]; affectedObjects;

 private : float angleCosine;

the problems with it are:

unexpected tokens: monobehaviour, static, int, gameobject

other problems: expecting EOF, found private

hope t$$anonymous$$s makes answering easier and thanx for ur help

Comment
Add comment · Show 4
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 Justin Warner · Apr 22, 2011 at 02:29 PM 1
Share

Please highlight your code and push the 10101 button up top to code-ify it. Thanks.

avatar image Justin Warner · Apr 22, 2011 at 02:31 PM 1
Share

Why do you have static; in there? That's not really helping... Maybe you should try to learn to script before you copy others code and understand why what happens...

avatar image MC HALO · Apr 22, 2011 at 03:03 PM 0
Share

I was going to say the same thing why did you place the ; after the Static ?

avatar image flaviusxvii · Apr 22, 2011 at 06:56 PM 0
Share

You aren't writing JAVA! It doesn't even look like Javascript. You should look at different examples of C#, and Javascript to understand the differences. And you're being pretty liberal with the use of ';' in the code. It indicates the end of a statement and is inappropriate after 'using', and 'static' and this is a real mess you have here.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Justin Warner · Apr 22, 2011 at 02:03 PM

http://www.google.com/search?client=opera&rls=en&q=unknown+token+unity3d&sourceid=opera&ie=utf-8&oe=utf-8&channel=suggest

Google helps.

But mainly, the type your trying to pass through doesn't exist, $$anonymous$$ghly recommend posting script so that others can help you more.

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 flaviusxvii · Apr 22, 2011 at 06:53 PM 0
Share

http://lmgtfy.com/?q=unknown+token+unity <-- shorter URL and more condescending.

avatar image Justin Warner · Apr 23, 2011 at 12:21 AM 0
Share

Lol, true, but meh... XD.

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Converted a script from C# to JS, Unexpected Token: .. What did I do? 1 Answer

Unexpected Token }. 1 Answer

Unexpected token: .. 1 Answer

unexpected token 2 Answers

Unexpected Token: Collider. 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