- Home /
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 this 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 this makes answering easier and thanx for ur help
Please highlight your code and push the 10101 button up top to code-ify it. Thanks.
Why do you have static; in there? That's not really helping... $$anonymous$$aybe you should try to learn to script before you copy others code and understand why what happens...
I was going to say the same thing why did you place the ; after the Static ?
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.
Answer by Justin Warner · Apr 22, 2011 at 02:03 PM
Google helps.
But mainly, the type your trying to pass through doesn't exist, highly recommend posting script so that others can help you more.
http://lmgtfy.com/?q=unknown+token+unity <-- shorter URL and more condescending.
Your answer
Follow this Question
Related Questions
Unexpected Token: Collider. 1 Answer
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