x


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

more ▼

asked Apr 22 '11 at 02:01 PM

monty gravatar image

monty
10 6 6 8

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

Apr 22 '11 at 02:29 PM Justin Warner

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...

Apr 22 '11 at 02:31 PM Justin Warner

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

Apr 22 '11 at 03:03 PM MC HALO

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.

Apr 22 '11 at 06:56 PM flaviusxvii
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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, highly recommend posting script so that others can help you more.

more ▼

answered Apr 22 '11 at 02:03 PM

Justin Warner gravatar image

Justin Warner
6.3k 19 27 65

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

Apr 22 '11 at 06:53 PM flaviusxvii

Lol, true, but meh... XD.

Apr 23 '11 at 12:21 AM Justin Warner
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x198
x34
x19
x12

asked: Apr 22 '11 at 02:01 PM

Seen: 2508 times

Last Updated: Apr 24 '11 at 12:13 PM