Expecting }, found 'static' is the error static var ammo = 100; static var maxAmmo = 100; var key : String = "mouse 0"; var bullet : Rigidbody; var speed : float = 1000; function Update () { if(Input.GetKeyDown(key)){ if(ammo > 0){ shoot(); } } } Please Help.
First of all LaneFox, if you won't help, then go away, noone asked you. Secondly, if you could post the whole error, not just one part of it, it will be easier to help, which line is the error referring to exactly?
There's nothing wrong with what was posted (aside from not using code tags). Post the whole thing, use code tags, and proper formatting. --Eric
Yeah, I expected that, it's not the best thing to format code like variables - function - more variables - function - etc etc. It's easier to understand, if you store every variable at the same place. You could also put some space between two variable group at the beginning and use comments to tag them.