Help with Fps Shooting Script

I have been following some tutorials and i have some errors, that i know where i went wrong just i dont know how to fix it. These are my current errors;
Assets/Shooting.js(67,55): BCE0043: Unexpected token: =.
Assets/Shooting.js(80,10): BCE0044: expecting (, found ‘Reload’.
Assets/Shooting.js(84,9): BCE0043: Unexpected token: yield.

The lines that have errors in them are as follows

67 BulletsLeft = =;
80 function Reload();{
84 yield WaitForSeconds(ReloadTime):

Please 2 things:

  1. try to post your code (if it’s not 10 pages) - without it’s a blind flight on guessing whats wrong and we can’t help that much.
  2. Posting code, click “Go Advanced” when you start your posting, mark your code and click #. That way code is better readable.

Yes, What Alex said.

From the little bit of code you do have posted there, I can help a little I think.

What are you trying to do on line 67? It looks like you are either trying to set BulletsLeft to a value, which should be BulletsLeft=whatever, or do a conditional check to see if BulletsLeft is equal to something, and you would need an if statement: if(BulletsLeft==whatever){

Line 80 doesnt need the semicolon if its the start of the function. If you are calling the function, you dont need “function” or the {.

I’m not really sure about the unexpected token: yield error, but I do see a colon at the end, where you should have a semi-colon.

These are all guesses, to be sure, we would need to see the actual code. Some errors can actually be caused by a problem in a previous line that might not necessarily throw an error itself. I suspect this may be the case with line 84. It could be as simple as a missing semi-colon in line 83 for example.