- Home /
FPS SCRIPT ERROR PLEASE HELP
I am getting an error with this java script PLEASE HELP.
var Bullet : Rigidbody;
var Spawn : Transform;
var BulletSpeed : float = 1000;
function Start () {
}
function Update () { if(Input.GetButtonDown("Fire1")){ Fire(); } }
function Fire(){ var bullet1 : Rigibody = Instantiate(Bullet,Spawn.position,Spawn.rotation); bullet1.AddForce(transform.forward *BulletSpeed); }
The error is Assets/Scripts/Gun.js(19,75): BCE0044: unexpected char: 0xAD.
Answer by Razacx · Oct 18, 2012 at 08:36 PM
var bullet1 : Rigibody
Rigibody should be Rigidbody.
Also, try to format your code the next time you post something, this can be done by pressing the "101010" button when creating a post.
Answer by MrVopemz · Oct 18, 2012 at 10:51 PM
Thanks for the suggestion, but I am still getting that same error.
Your answer
![](https://koobas.hobune.stream/wayback/20220613082554im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
NullReferenceException 1 Answer
Compiler error: BCE0044: unexpected char: 0xFFFD 2 Answers
CS0103 Error 1 Answer
error CS1061 anybody might help me? 1 Answer