|
what does it mean when it says there is an unexpected token in a script like: unexpected token: camera unexpected token: strict unexpected token: implicit can anyone help with this cos i need the script for my homework and only have a few days left to complete it. thanx here is the script
another problem on a different script it expecting } found ;. ( character 22) and here is the line of code with the problem but i cant find where to put the } cos every where creates more problems with it. public var camera; ;: main; camera; thanx again for any help
(comments are locked)
|
|
unexpected token: camera means you have the word camera in there and your not using it properly. look at the camera script reference you should spot your problem straight away.
dont need to be in your script unless your optomising it for online play and they should be at the very top of the page. an eof is an end of function which is this } character you put it at the end of functions!
ignore the meaning of the words and look at how the eof is used, there is always a start of function and end of function just like you would use sentances and paragraphs in literary English EDIT if you are finding errors asking for eofs and there are already ones there it means the syntax for the previopus line is incomplete, have a look at the line above and check that the parametres you have put in match the ones on the script reference for it this is the top of the page and camera is the first word but it is saying it needs eof. thanx for the help btw it was really helpful
Apr 20 '11 at 01:37 PM
monty
i have deleted those things now cos this isnt designed for online but nod it says i need ;'s in places where there are already some there
Apr 20 '11 at 01:41 PM
monty
(comments are locked)
|
|
It sounds like there's a simple parsing error in your script (e.g. a mismatched brace). If you need more specific help than that, edit your post to include the script that's generating the error.
Apr 20 '11 at 01:17 PM
AngryOldMan
(comments are locked)
|

i have managed to get these problems to go away now by having 'camera: main' instead of main camera but it now says it wants eof instead of camera does anyone know what that means and how to solve it?
duplicate of http://answers.unity3d.com/questions/52341/cant-debug-this-script
check updated answer