x


a problem with shooting scripts

i am currently working in a first person game and i am attempting to script a shooting ability in Java script however an error with the code keeps appearing that i do not understand also not that i am only just starting in unity as well as coding.

here is the error : Assets/ShootScript.Js9(3,4): BVE0043: Unexpected Token: ..

here is the actual script:

alt text

Untitled.png (247.3 kB)
more ▼

asked May 03 '12 at 03:03 PM

ryand444 gravatar image

ryand444
18 1 8 11

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

It's

var prefabBullet : Transform

,without the dot between them. That code is not complete, by the way. There are not closed brackets.

more ▼

answered May 03 '12 at 03:03 PM

BiG gravatar image

BiG
4.7k 4 13 49

(comments are locked)
10|3000 characters needed characters left

thank you both of you your help is appreciated.

more ▼

answered May 08 '12 at 10:56 AM

ryand444 gravatar image

ryand444
18 1 8 11

(comments are locked)
10|3000 characters needed characters left

You can get the solution by removing the dot or else var prefabBullet =Transform

EDIT: removed advertising

more ▼

answered May 07 '12 at 02:27 PM

magento1 gravatar image

magento1
0

(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:

x3446
x274
x9

asked: May 03 '12 at 03:03 PM

Seen: 499 times

Last Updated: May 08 '12 at 10:56 AM